Skip to content

Examples - how to run them from CLI (newbie) #1768

Answered by JohannesMeierSE
anrl asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @anrl,

thanks for your feedback!

For me, the following worked:

git clone ...
cd langium
npm install
npm run build
cd examples/arithmetics
node ./bin/cli eval example/example.calc

... and produced this result:

line 14: 2 * c ===> 16
line 15: b % 2 ===> 1
line 18: Root(D, 3) ===> 4.999999999999999
line 19: Root(64, 3) ===> 3.9999999999999996
line 20: Sqrt(81) ===> 9

Could you try this on your side?
Then I would create a PR for updating the documentation!

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@msujew
Comment options

Answer selected by anrl
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants