Skip to content

Commit

Permalink
added a test, added some sample code for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeStanleySEL committed May 2, 2024
1 parent acadccb commit e05ec06
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion blark/iec.lark
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ _type_declaration: array_type_declaration
| subrange_type_declaration
| enumerated_type_declaration

simple_type_declaration: simple_type_name [ extends ] ":" simple_spec_init
simple_type_declaration: simple_type_name ("," simple_type_name)* [ extends ] ":" simple_spec_init

indirection_type: REFERENCE_TO
| POINTER_TO+
Expand Down
2 changes: 1 addition & 1 deletion blark/tests/source/repeated_declaration.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
METHOD doSomethingCool : BOOL
VAR_INPUT
AlertTimer, SignalBadTimer, QualityBadTimer : library.TPUDO;
AlertTimer, SignalBadTimer : library.TPUDO;
END_VAR

// do some stuff
Expand Down
1 change: 1 addition & 0 deletions blark/tests/test_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ def test_bool_literal_roundtrip(name, value, expected):
param("expression", "_directoryFileList.Item(_i).ToString()"),
param("expression", "_directoryFileList.Item(_i)^.ToString()"),
param("simple_type_declaration", "TypeName : INT"),
param("simple_type_declaration", "TypeName, TypeName2 : INT"),
param("simple_type_declaration", "TypeName : INT := 5"),
param("simple_type_declaration", "TypeName : INT := 5 + 1 * (2)"),
param("simple_type_declaration", "TypeName : REFERENCE TO INT"),
Expand Down

0 comments on commit e05ec06

Please sign in to comment.