Skip to content
Discussion options

You must be logged in to vote

Hey @rhumbertgz,

Langium is by default using a very simple lexical scoping mechanism (i.e. you can reference everything that is declared locally or in a parent of the current AST node). Since the Let and Go nodes probably live in different hierarchies, they can't see each other directly through the lexical scoping. So to fix this, you'll need to do the following:

  1. First off, multiple names for single a element are not supported by default, but I believe you want to declare three separate elements anyway. So you'll need to refactor your Let rule slightly:
Let: 'let' variables+=Variable (',' variables+=Variable)* type=('tello' | 'mbot');
Variable: name=ID;
  1. Tell the scope computation that…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by spoenemann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants