Skip to content

Can not compile hello_world.st #386

Open
@vitw

Description

@vitw

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

Metadata

Metadata

Assignees

Labels

0.2Ideal to solve for the 0.2 Preview releasebugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions