Skip to content

Commit

Permalink
Merge pull request #124 from ortus-boxlang/development
Browse files Browse the repository at this point in the history
1.0.0-Beta18
  • Loading branch information
lmajano authored Oct 11, 2024
2 parents c1c4a58 + 2ba2eb2 commit 77666e7
Show file tree
Hide file tree
Showing 81 changed files with 1,861 additions and 471 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ dependencies {
// https://mvnrepository.com/artifact/com.zaxxer/HikariCP
implementation 'com.zaxxer:HikariCP:6.0.0'
// https://mvnrepository.com/artifact/org.ow2.asm/asm-tree
implementation 'org.ow2.asm:asm-tree:9.7'
implementation 'org.ow2.asm:asm-tree:9.7.1'
// https://mvnrepository.com/artifact/org.ow2.asm/asm-util
implementation 'org.ow2.asm:asm-util:9.7'
implementation 'org.ow2.asm:asm-util:9.7.1'
}

/**
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Fri Sep 27 20:09:04 UTC 2024
#Fri Oct 04 18:10:20 UTC 2024
antlrVersion=4.13.1
jdkVersion=21
version=1.0.0-beta17
version=1.0.0-beta18
18 changes: 13 additions & 5 deletions src/main/antlr/CFLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,14 @@ options {
}

public void reset() {
resetCounters();
super.reset();
}

public void resetCounters() {
parenCount = 0;
braceCount = 0;
bracketCount = 0;
super.reset();
}

private boolean isExpressionComplete() {
Expand Down Expand Up @@ -480,19 +484,23 @@ TEMPLATE_ARGUMENT : 'argument' -> pushMode( TEMPLATE_COMPONENT_MODE );
// return may or may not have an expression, so eat any leading whitespace now so it doesn't give us an expression part that's just a space
TEMPLATE_RETURN:
'return' [ \t\r\n]* -> pushMode( TEMPLATE_COMPONENT_MODE ), pushMode( TEMPLATE_EXPRESSION_MODE_COMPONENT), pushMode( DEFAULT_SCRIPT_MODE)
'return' [ \t\r\n]* {resetCounters();} -> pushMode( TEMPLATE_COMPONENT_MODE ), pushMode( TEMPLATE_EXPRESSION_MODE_COMPONENT), pushMode(
DEFAULT_SCRIPT_MODE)
;
TEMPLATE_IF:
'if' [ \t\r\n]+ -> pushMode( TEMPLATE_COMPONENT_MODE ), pushMode(TEMPLATE_EXPRESSION_MODE_COMPONENT), pushMode( DEFAULT_SCRIPT_MODE)
'if' [ \t\r\n]+ {resetCounters();} -> pushMode( TEMPLATE_COMPONENT_MODE ), pushMode(TEMPLATE_EXPRESSION_MODE_COMPONENT), pushMode(
DEFAULT_SCRIPT_MODE)
;
TEMPLATE_ELSE: 'else' -> pushMode( TEMPLATE_COMPONENT_MODE );
TEMPLATE_ELSEIF:
'elseif' [ \t\r\n]+ -> pushMode( TEMPLATE_COMPONENT_MODE ), pushMode(TEMPLATE_EXPRESSION_MODE_COMPONENT), pushMode( DEFAULT_SCRIPT_MODE)
'elseif' [ \t\r\n]+ {resetCounters();} -> pushMode( TEMPLATE_COMPONENT_MODE ), pushMode(TEMPLATE_EXPRESSION_MODE_COMPONENT), pushMode(
DEFAULT_SCRIPT_MODE)
;
TEMPLATE_SET:
'set' [ \t\r\n]+ -> pushMode( TEMPLATE_COMPONENT_MODE ), pushMode( TEMPLATE_EXPRESSION_MODE_COMPONENT), pushMode( DEFAULT_SCRIPT_MODE)
'set' [ \t\r\n]+ {resetCounters();} -> pushMode( TEMPLATE_COMPONENT_MODE ), pushMode( TEMPLATE_EXPRESSION_MODE_COMPONENT), pushMode(
DEFAULT_SCRIPT_MODE)
;
TEMPLATE_TRY : 'try' -> pushMode( TEMPLATE_COMPONENT_MODE );
Expand Down
Loading

0 comments on commit 77666e7

Please sign in to comment.