Skip to content

Commit

Permalink
Fix edge case behavior in parser value assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
msujew committed Jul 28, 2023
1 parent 13f482b commit 8e7ed4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/langium/src/parser/langium-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export class LangiumParser extends AbstractLangiumParser {
cstNode = this.nodeBuilder.buildCompositeNode(feature);
}
const subruleResult = this.wrapper.wrapSubrule(idx, rule, args) as any;
if (!this.isRecording() && cstNode && cstNode.length > 0) {
if (!this.isRecording() && cstNode && cstNode.content.length > 0) {
this.performSubruleAssignment(subruleResult, feature, cstNode);
}
}
Expand Down

0 comments on commit 8e7ed4b

Please sign in to comment.