Skip to content

Commit 5e4c579

Browse files
committed
fix: Made the mspec parser allow using variables with names matching field types in expressions.
1 parent ee8d2fa commit 5e4c579

File tree

1 file changed

+1
-1
lines changed
  • code-generation/protocol-base-mspec/src/main/antlr4/org/apache/plc4x/plugins/codegenerator/language/mspec

1 file changed

+1
-1
lines changed

code-generation/protocol-base-mspec/src/main/antlr4/org/apache/plc4x/plugins/codegenerator/language/mspec/MSpec.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ innerExpression
230230
: valueLiteral
231231
// Explicitly allow the loop type keywords in expressions
232232
| ARRAY_LOOP_TYPE
233-
| IDENTIFIER_LITERAL ('(' (innerExpression (',' innerExpression)* )? ')')? ('[' innerExpression ']')?
233+
| idExpression ('(' (innerExpression (',' innerExpression)* )? ')')? ('[' innerExpression ']')?
234234
| innerExpression '.' innerExpression // Field Reference or method call
235235
| innerExpression '[' + INTEGER_LITERAL + ']' // Array index
236236
| innerExpression binaryOperator innerExpression // Addition

0 commit comments

Comments
 (0)