-
Hello, I am using Langium, and I am currently working on applying edits from a table editor that I am creating to the DSL. In doing so, I ran into an issue in certain cases. Lets say I have the following parser rule: Person: 'person' name=STRING After creating a few people in a file and inspecting the parse results, it seems that the AST nodes for the people have a name property that is simply a string, not an AST node. Thus there seems to be no CST node for the people's names either. I also could not find a property on the CST nodes for the people that would tell me where in the text document the names of the people are. Is there a way to get the text file location of simple string properties of parser rules? Thank you, Greg |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Why do you expect name to be an ast node. STRING is a terminal rule and as a such produces a value |
Beta Was this translation helpful? Give feedback.
-
I guess I do not expect it to be an AST node, I am just looking for a way
to locate where that string is in the text file so that I can edit it
…On Wed, Oct 23, 2024, 10:03 AM Christian Dietrich ***@***.***> wrote:
Why do you expect name to be an ast node. STRING is a terminal rule and as
a such produces a value
—
Reply to this email directly, view it on GitHub
<#1723 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD6BIA5JE26KGY4EMJIENMTZ47JHHAVCNFSM6AAAAABQPIUVKSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMBTGIYDMMI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
Maybe GrammarUtil findNodeForProperty helps