Description
I think I am missing something in here.
I try to build hello_world.st with the following command:
./rustyc -c examples/hello_world.st -o hello_world.o
And get the following in terminal:
error: Unexpected token: expected Identifier but found exit
┌─ examples/hello_world.st:7:20
│
7 │ @external FUNCTION exit : DINT
│ ^^^^
error: Unexpected token: expected Literal but found :
┌─ examples/hello_world.st:7:25
│
7 │ @external FUNCTION exit : DINT
│ ^
error: Unexpected token: expected KeywordSemicolon but found 'VAR_INPUT
status'
┌─ examples/hello_world.st:8:1
│
8 │ ╭ VAR_INPUT
9 │ │ status : DINT;
│ ╰──────────^
error: Unexpected token: expected Literal but found END_VAR
┌─ examples/hello_world.st:10:1
│
10 │ END_VAR
│ ^^^^^^^
error: Unexpected token: expected KeywordSemicolon but found 'END_VAR'
┌─ examples/hello_world.st:10:1
│
10 │ END_VAR
│ ^^^^^^^
error: Missing expected Token [KeywordSemicolon, KeywordColon]
┌─ examples/hello_world.st:11:1
│
11 │ END_FUNCTION
│ ^^^^^^^^^^^^
error: Unexpected token: expected KeywordSemicolon but found 'END_FUNCTION'
┌─ examples/hello_world.st:11:1
│
11 │ END_FUNCTION
│ ^^^^^^^^^^^^
error: Function Return type missing
┌─ examples/hello_world.st:7:11
│
7 │ @external FUNCTION exit : DINT
│ ╭───────────^
8 │ │ VAR_INPUT
9 │ │ status : DINT;
10 │ │ END_VAR
11 │ │ END_FUNCTION
│ ╰────────────^
error: Could not resolve reference to DINT
┌─ examples/hello_world.st:7:27
│
7 │ @external FUNCTION exit : DINT
│ ^^^^
error: Could not resolve reference to DINT
┌─ examples/hello_world.st:9:14
│
9 │ status : DINT;
│ ^^^^
Error: Cannot break out of loop when not inside a loop