Skip to content

Commit

Permalink
Fix indentation duplication as a whitespace token
Browse files Browse the repository at this point in the history
  • Loading branch information
aabounegm committed Oct 2, 2024
1 parent dc18342 commit 3994c08
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions packages/langium/src/parser/indentation-aware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,16 +272,7 @@ export class IndentationAwareTokenBuilder<Terminals extends string = string, Key

this.indentationStack.push(currIndentLevel);

const indentToken = this.createIndentationTokenInstance(
this.indentTokenType,
text,
match?.[0] ?? '',
offset,
);
tokens.push(indentToken);

// Token already added, let the indentation now be consumed as whitespace and ignored
return null;
return match;
}

/**
Expand Down

0 comments on commit 3994c08

Please sign in to comment.