Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error when using ilidoc for associations #46

Open
beistehen opened this issue Dec 2, 2024 · 0 comments
Open

Compile error when using ilidoc for associations #46

beistehen opened this issue Dec 2, 2024 · 0 comments

Comments

@beistehen
Copy link
Contributor

Problem

Given the following model snippet:

/** ilidoc Association
 */
ASSOCIATION Assoc1 =
    AssocA -- {0..*} ClassA;
    AssocB -<> {1} ClassB;
END Assoc1;

When using the new functionality Generate markdown documentation INTERLIS2 Language Server crashes and no output is generated. The following error is shown in the log:

[Error - 2:19:26 PM] Parser: Compile error at line 15:8 no viable alternative at input '/** ilidoc Association\r\n         */\r\n        ASSOCIATION'. - Antlr4.Runtime.NoViableAltException: Exception of type 'Antlr4.Runtime.NoViableAltException' was thrown.
   at Antlr4.Runtime.Atn.ParserATNSimulator.ExecATN(DFA dfa, DFAState s0, ITokenStream input, Int32 startIndex, ParserRuleContext outerContext)
   at Antlr4.Runtime.Atn.ParserATNSimulator.AdaptivePredict(ITokenStream input, Int32 decision, ParserRuleContext outerContext)
   at Geowerkstatt.Interlis.Tools.Interlis24Parser.topicContents() | Line='15' CharPosition='8' Message='no viable alternative at input '/** ilidoc Association\r\n         */\r\n        ASSOCIATION''
...

Expected behaviour

At the time of writing ilidoc is not supported when generating markdown documentation. So output should be generated ignoring ilidoc, as it is simply a block comment with an additional *.

Tests show that ilidoc blocks for other model elements are ignored correctly.

Version affected: 0.2.1

test-model and complete log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant