Skip to content

Commit b57de01

Browse files
authored
Merge pull request #156 from ortus-boxlang/development
beta26
2 parents 2ba1ba4 + 24f3343 commit b57de01

File tree

359 files changed

+13446
-3442
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

359 files changed

+13446
-3442
lines changed

.github/workflows/tests.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
- name: Checkout Repository
3636
uses: actions/checkout@v4
3737

38+
3839
- name: Setup Java
3940
uses: actions/setup-java@v4
4041
with:
@@ -52,8 +53,16 @@ jobs:
5253
# mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} -e 'CREATE DATABASE mementifier;'
5354
# mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} < test-harness/tests/resources/coolblog.sql
5455

55-
#- name: Setup CommandBox CLI
56-
# uses: Ortus-Solutions/[email protected]
56+
- name: Setup CommandBox CLI Linux
57+
if: ${{ matrix.os != 'windows-latest' }}
58+
uses: Ortus-Solutions/[email protected]
59+
60+
- name: Setup CommandBox CLI Windows
61+
if: ${{ matrix.os == 'windows-latest' }}
62+
run: choco install commandbox
63+
64+
- name: Install TestBox
65+
run: box install testbox@be src/test/resources --verbose --noSave
5766

5867
# Not Needed in this module
5968
#- name: Setup Environment For Testing Process

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ derby.log
4242

4343
src/test/java/ortus/boxlang/compiler/Precompiled.bx
4444
src/test/java/ortus/boxlang/compiler/Precompiled.bxs
45+
/src/test/resources/testbox

build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ plugins {
1212
id "application"
1313
id 'antlr'
1414
// For source code formatting
15-
id "com.diffplug.spotless" version "6.25.0"
15+
id "com.diffplug.spotless" version "7.0.1"
1616
// For building shadow jars with jdk 17 ONLY
1717
//id 'com.github.johnrengelman.shadow' version '8.1.1'
1818
// For building shadow jars using JDK 21 +, they had to fork
@@ -109,12 +109,12 @@ dependencies {
109109
// https://mvnrepository.com/artifact/commons-io/commons-io
110110
implementation "commons-io:commons-io:2.18.0"
111111
// https://mvnrepository.com/artifact/com.github.javaparser/javaparser-symbol-solver-core
112-
implementation 'com.github.javaparser:javaparser-symbol-solver-core:3.26.2'
112+
implementation 'com.github.javaparser:javaparser-symbol-solver-core:3.26.3'
113113
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
114114
implementation 'org.apache.commons:commons-lang3:3.17.0'
115115
// https://mvnrepository.com/artifact/org.apache.commons/commons-text
116116
// Many of these classes ( e.g. StringEscapeUtils ) are currently deprecated in commons-lang and others will be moved in the future
117-
implementation 'org.apache.commons:commons-text:1.12.0'
117+
implementation 'org.apache.commons:commons-text:1.13.0'
118118
// https://mvnrepository.com/artifact/org.apache.commons/commons-cli
119119
implementation "commons-cli:commons-cli:1.9.0"
120120
// https://mvnrepository.com/artifact/com.fasterxml.jackson.jr/jackson-jr-objects
@@ -128,15 +128,15 @@ dependencies {
128128
// https://mvnrepository.com/artifact/org.slf4j/slf4j-api
129129
implementation 'org.slf4j:slf4j-api:2.0.16'
130130
// https://mvnrepository.com/artifact/ch.qos.logback/logback-classic
131-
implementation 'ch.qos.logback:logback-classic:1.5.12'
131+
implementation 'ch.qos.logback:logback-classic:1.5.16'
132132
// https://mvnrepository.com/artifact/com.zaxxer/HikariCP
133133
implementation 'com.zaxxer:HikariCP:6.2.1'
134134
// https://mvnrepository.com/artifact/org.ow2.asm/asm-tree
135135
implementation 'org.ow2.asm:asm-tree:9.7.1'
136136
// https://mvnrepository.com/artifact/org.ow2.asm/asm-util
137137
implementation 'org.ow2.asm:asm-util:9.7.1'
138138
// https://mvnrepository.com/artifact/org.semver4j/semver4j
139-
implementation 'org.semver4j:semver4j:5.4.1'
139+
implementation 'org.semver4j:semver4j:5.5.0'
140140

141141
}
142142

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Mon Dec 02 11:29:56 UTC 2024
1+
#Fri Dec 13 21:14:22 UTC 2024
22
antlrVersion=4.13.1
33
jdkVersion=21
4-
version=1.0.0-beta25
4+
version=1.0.0-beta26

src/main/antlr/BoxScriptGrammar.g4

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ identifier: IDENTIFIER | reservedKeyword
2222
componentName
2323
:
2424
// Ask the component service if the component exists and verify that this context is actually a component.
25-
{ isComponent(_input) }? identifier
26-
//identifier
25+
// { isComponent(_input) }? identifier
26+
identifier
27+
;
28+
29+
specialComponentName: TRANSACTION | LOCK | THREAD | ABORT | EXIT | PARAM
2730
;
2831

2932
// These are reserved words in the lexer, but are allowed to be an indentifer (variable name, method name)
@@ -92,6 +95,11 @@ reservedKeyword
9295
| VAR
9396
| WHEN
9497
| WHILE
98+
| TRANSACTION
99+
| LOCK
100+
| THREAD
101+
| ABORT
102+
| EXIT
95103
;
96104

97105
reservedOperators
@@ -313,9 +321,11 @@ not: NOT expression
313321

314322
// bx:http url="google.com" {}?
315323
component
316-
:
317-
// COMPONENT_PREFIX componentName componentAttribute* (normalStatementBlock | SEMICOLON)
318-
componentName componentAttribute* (normalStatementBlock | SEMICOLON)
324+
: (( COMPONENT_PREFIX componentName) | specialComponentName) componentAttribute* (
325+
normalStatementBlock
326+
| SEMICOLON
327+
)
328+
//componentName componentAttribute* (normalStatementBlock | SEMICOLON)
319329
;
320330

321331
componentAttribute: identifier ((EQUALSIGN | COLON) expression)?

src/main/antlr/BoxScriptLexer.g4

Lines changed: 73 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -19,74 +19,79 @@ options {
1919
caseInsensitive = true;
2020
}
2121

22-
ABSTRACT : 'ABSTRACT';
23-
ANY : 'ANY';
24-
ARRAY : 'ARRAY';
25-
AS : 'AS';
26-
ASSERT : 'ASSERT';
27-
BOOLEAN : 'BOOLEAN';
28-
BREAK : 'BREAK';
29-
CASE : 'CASE';
30-
CASTAS : 'CASTAS';
31-
CATCH : 'CATCH';
32-
CONTAIN : 'CONTAIN';
33-
CONTAINS : 'CONTAINS';
34-
CONTINUE : 'CONTINUE';
35-
DEFAULT : 'DEFAULT';
36-
DO : 'DO';
37-
DOES : 'DOES';
38-
ELIF : 'ELIF';
39-
ELSE : 'ELSE';
40-
EQV : 'EQV';
41-
FALSE : 'FALSE';
42-
FINAL : 'FINAL';
43-
FINALLY : 'FINALLY';
44-
FOR : 'FOR';
45-
FUNCTION : 'FUNCTION';
46-
GREATER : 'GREATER';
47-
IF : 'IF';
48-
IMP : 'IMP';
49-
IMPORT : 'IMPORT';
50-
IN : 'IN';
51-
INCLUDE : 'INCLUDE';
52-
INSTANCEOF : 'INSTANCEOF';
53-
INTERFACE : 'INTERFACE';
54-
IS : 'IS';
55-
JAVA : 'JAVA';
56-
LESS : 'LESS';
57-
MESSAGE : 'MESSAGE';
58-
MOD : 'MOD';
59-
NEW : 'NEW';
60-
NULL : 'NULL';
61-
NUMERIC : 'NUMERIC';
62-
PARAM : 'PARAM';
63-
PACKAGE : 'PACKAGE';
64-
PRIVATE : 'PRIVATE';
65-
PROPERTY : 'PROPERTY';
66-
PUBLIC : 'PUBLIC';
67-
QUERY : 'QUERY';
68-
REMOTE : 'REMOTE';
69-
REQUIRED : 'REQUIRED';
70-
RETHROW : 'RETHROW';
71-
RETURN : 'RETURN';
72-
REQUEST : 'REQUEST';
73-
SERVER : 'SERVER';
74-
SETTING : 'SETTING';
75-
STATIC : 'STATIC';
76-
STRING : 'STRING';
77-
STRUCT : 'STRUCT';
78-
SWITCH : 'SWITCH';
79-
THAN : 'THAN';
80-
THROW : 'THROW';
81-
TO : 'TO';
82-
TRUE : 'TRUE';
83-
TRY : 'TRY';
84-
TYPE : 'TYPE';
85-
VAR : 'VAR';
86-
VARIABLES : 'VARIABLES';
87-
WHEN : 'WHEN';
88-
WHILE : 'WHILE';
89-
XOR : 'XOR';
22+
ABORT : 'ABORT';
23+
ABSTRACT : 'ABSTRACT';
24+
ANY : 'ANY';
25+
ARRAY : 'ARRAY';
26+
AS : 'AS';
27+
ASSERT : 'ASSERT';
28+
BOOLEAN : 'BOOLEAN';
29+
BREAK : 'BREAK';
30+
CASE : 'CASE';
31+
CASTAS : 'CASTAS';
32+
CATCH : 'CATCH';
33+
CONTAIN : 'CONTAIN';
34+
CONTAINS : 'CONTAINS';
35+
CONTINUE : 'CONTINUE';
36+
DEFAULT : 'DEFAULT';
37+
DO : 'DO';
38+
DOES : 'DOES';
39+
ELIF : 'ELIF';
40+
ELSE : 'ELSE';
41+
EQV : 'EQV';
42+
EXIT : 'EXIT';
43+
FALSE : 'FALSE';
44+
FINAL : 'FINAL';
45+
FINALLY : 'FINALLY';
46+
FOR : 'FOR';
47+
FUNCTION : 'FUNCTION';
48+
GREATER : 'GREATER';
49+
IF : 'IF';
50+
IMP : 'IMP';
51+
IMPORT : 'IMPORT';
52+
IN : 'IN';
53+
INCLUDE : 'INCLUDE';
54+
INSTANCEOF : 'INSTANCEOF';
55+
INTERFACE : 'INTERFACE';
56+
IS : 'IS';
57+
JAVA : 'JAVA';
58+
LESS : 'LESS';
59+
LOCK : 'LOCK';
60+
MESSAGE : 'MESSAGE';
61+
MOD : 'MOD';
62+
NEW : 'NEW';
63+
NULL : 'NULL';
64+
NUMERIC : 'NUMERIC';
65+
PARAM : 'PARAM';
66+
PACKAGE : 'PACKAGE';
67+
PRIVATE : 'PRIVATE';
68+
PROPERTY : 'PROPERTY';
69+
PUBLIC : 'PUBLIC';
70+
QUERY : 'QUERY';
71+
REMOTE : 'REMOTE';
72+
REQUIRED : 'REQUIRED';
73+
RETHROW : 'RETHROW';
74+
RETURN : 'RETURN';
75+
REQUEST : 'REQUEST';
76+
SERVER : 'SERVER';
77+
SETTING : 'SETTING';
78+
STATIC : 'STATIC';
79+
STRING : 'STRING';
80+
STRUCT : 'STRUCT';
81+
SWITCH : 'SWITCH';
82+
THAN : 'THAN';
83+
THREAD : 'THREAD';
84+
THROW : 'THROW';
85+
TO : 'TO';
86+
TRANSACTION : 'TRANSACTION';
87+
TRUE : 'TRUE';
88+
TRY : 'TRY';
89+
TYPE : 'TYPE';
90+
VAR : 'VAR';
91+
VARIABLES : 'VARIABLES';
92+
WHEN : 'WHEN';
93+
WHILE : 'WHILE';
94+
XOR : 'XOR';
9095

9196
CLASS: 'CLASS';
9297

src/main/antlr/CFGrammar.g4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ structKey
479479
| INTEGER_LITERAL
480480
| ILLEGAL_IDENTIFIER
481481
| fqn
482+
| SWITCH
482483
;
483484

484485
new: NEW preFix? (fqn | stringLiteral) LPAREN argumentList? RPAREN

0 commit comments

Comments
 (0)