Skip to content

Commit a6d8bae

Browse files
committed
Fix issue to compute the length of labeled literals
1 parent 350a015 commit a6d8bae

File tree

1 file changed

+2
-0
lines changed
  • rascal-textmate-core/src/main/rascal/lang/rascal/grammar/analyze

1 file changed

+2
-0
lines changed

rascal-textmate-core/src/main/rascal/lang/rascal/grammar/analyze/Symbols.rsc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ private default Maybe[int] max(Maybe[int] _, Maybe[int] _) = nothing();
142142
Computes the length of a terminal symbol as a range
143143
}
144144
145+
Range length(label(_, symbol)) = length(symbol);
146+
145147
Range length(\lit(string)) = <size(string), just(size(string))>;
146148
Range length(\cilit(string)) = <size(string), just(size(string))>;
147149
Range length(\char-class(_)) = <1, just(1)>;

0 commit comments

Comments
 (0)