From 765fb529671460625e35811fe58d1b2520b6d0fb Mon Sep 17 00:00:00 2001 From: sebthom Date: Sun, 15 May 2022 16:23:45 +0200 Subject: [PATCH 01/41] add RuleId class --- .../tm4e/core/internal/grammar/Grammar.java | 32 ++++---- .../tm4e/core/internal/grammar/Injection.java | 5 +- .../core/internal/grammar/LineTokenizer.java | 26 ++++--- .../tm4e/core/internal/grammar/RawRule.java | 7 +- .../core/internal/grammar/StackElement.java | 14 ++-- .../tm4e/core/internal/rule/BeginEndRule.java | 12 +-- .../core/internal/rule/BeginWhileRule.java | 21 ++--- .../tm4e/core/internal/rule/CaptureRule.java | 13 ++-- .../internal/rule/CompilePatternsResult.java | 11 ++- .../tm4e/core/internal/rule/CompiledRule.java | 4 +- .../core/internal/rule/IRuleRegistry.java | 12 +-- .../core/internal/rule/IncludeOnlyRule.java | 9 ++- .../tm4e/core/internal/rule/MatchRule.java | 7 +- .../tm4e/core/internal/rule/RegExpSource.java | 6 +- .../core/internal/rule/RegExpSourceList.java | 12 +-- .../eclipse/tm4e/core/internal/rule/Rule.java | 4 +- .../tm4e/core/internal/rule/RuleFactory.java | 51 ++++++------ .../tm4e/core/internal/rule/RuleId.java | 77 +++++++++++++++++++ .../tm4e/core/internal/types/IRawRule.java | 5 +- 19 files changed, 205 insertions(+), 123 deletions(-) create mode 100644 org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleId.java diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java index 2a13271a5..7d4e4d816 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java @@ -17,8 +17,6 @@ */ package org.eclipse.tm4e.core.internal.grammar; -import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*; - import java.lang.System.Logger; import java.lang.System.Logger.Level; import java.util.ArrayList; @@ -28,9 +26,8 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import java.util.function.IntFunction; +import java.util.function.Function; -import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; import org.eclipse.tm4e.core.grammar.IGrammar; import org.eclipse.tm4e.core.grammar.IStackElement; @@ -42,6 +39,7 @@ import org.eclipse.tm4e.core.internal.rule.IRuleFactoryHelper; import org.eclipse.tm4e.core.internal.rule.Rule; import org.eclipse.tm4e.core.internal.rule.RuleFactory; +import org.eclipse.tm4e.core.internal.rule.RuleId; import org.eclipse.tm4e.core.internal.theme.IThemeProvider; import org.eclipse.tm4e.core.internal.types.IRawGrammar; import org.eclipse.tm4e.core.internal.types.IRawRepository; @@ -60,9 +58,10 @@ public final class Grammar implements IGrammar, IRuleFactoryHelper { private final String scopeName; - private int rootId = -1; + @Nullable + private RuleId rootId = null; private int lastRuleId = 0; - private final Map ruleId2desc = new HashMap<>(); + private final Map ruleId2desc = new HashMap<>(); private final Map includedGrammars = new HashMap<>(); private final IGrammarRepository grammarRepository; private final IRawGrammar grammar; @@ -122,7 +121,7 @@ ScopeMetadata getMetadataForScope(final String scope) { private void collectInjections(final List result, final String selector, final IRawRule rule, final IRuleFactoryHelper ruleFactoryHelper, final IRawGrammar grammar) { final var matchers = Matcher.createMatchers(selector); - final int ruleId = RuleFactory.getCompiledRuleId(rule, ruleFactoryHelper, this.grammar.getRepository()); + final var ruleId = RuleFactory.getCompiledRuleId(rule, ruleFactoryHelper, this.grammar.getRepository()); for (final var matcher : matchers) { result.add(new Injection(selector, matcher.matcher, ruleId, grammar, matcher.priority)); @@ -205,19 +204,19 @@ List getInjections() { } @Override - public T registerRule(final IntFunction factory) { - final int id = ++this.lastRuleId; + public T registerRule(final Function factory) { + final var id = RuleId.of(++this.lastRuleId); final @Nullable T result = factory.apply(id); this.ruleId2desc.put(id, result); return result; } @Override - public Rule getRule(final int patternId) { - final var rule = this.ruleId2desc.get(patternId); + public Rule getRule(final RuleId ruleId) { + final var rule = this.ruleId2desc.get(ruleId); if (rule == null) { throw new IndexOutOfBoundsException( - "No rule with index " + patternId + " found. Possible values: 0.." + this.ruleId2desc.size()); + "No rule with index " + ruleId.id + " found. Possible values: 0.." + this.ruleId2desc.size()); } return rule; } @@ -279,8 +278,9 @@ public ITokenizeLineResult2 tokenizeLine2(final String lineText, @Nullable final @SuppressWarnings("unchecked") private T tokenize(String lineText, @Nullable StackElement prevState, final boolean emitBinaryTokens) { - if (this.rootId == -1) { - this.rootId = RuleFactory.getCompiledRuleId(this.grammar.getRepository().getSelf(), this, + var rootId = this.rootId; + if (rootId == null) { + rootId = this.rootId = RuleFactory.getCompiledRuleId(this.grammar.getRepository().getSelf(), this, this.grammar.getRepository()); } @@ -294,7 +294,7 @@ private T tokenize(String lineText, @Nullable StackElement prevState, final rawDefaultMetadata.tokenType, null, defaultTheme.fontStyle, defaultTheme.foreground, defaultTheme.background); - final var rootRule = castNonNull(this.getRule(this.rootId)); + final var rootRule = this.getRule(rootId); final var rootScopeName = rootRule.getName(null, null); final var rawRootMetadata = this.scopeMetadataProvider.getMetadataForScope(rootScopeName); final int rootMetadata = ScopeListElement.mergeMetadata(defaultMetadata, null, rawRootMetadata); @@ -302,7 +302,7 @@ private T tokenize(String lineText, @Nullable StackElement prevState, final final var scopeList = new ScopeListElement(null, rootScopeName == null ? "unknown" : rootScopeName, rootMetadata); - prevState = new StackElement(null, this.rootId, -1, -1, false, null, scopeList, scopeList); + prevState = new StackElement(null, rootId, -1, -1, false, null, scopeList, scopeList); } else { isFirstLine = false; prevState.reset(); diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Injection.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Injection.java index f6fc0bc13..d61539f95 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Injection.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Injection.java @@ -19,6 +19,7 @@ import java.util.List; import org.eclipse.tm4e.core.internal.matcher.Matcher; +import org.eclipse.tm4e.core.internal.rule.RuleId; import org.eclipse.tm4e.core.internal.types.IRawGrammar; final class Injection { @@ -26,10 +27,10 @@ final class Injection { final String debugSelector; private final Matcher> matcher; final int priority; // -1 | 0 | 1; // 0 is the default. -1 for 'L' and 1 for 'R' - final int ruleId; + final RuleId ruleId; final IRawGrammar grammar; - Injection(final String debugSelector, final Matcher> matcher, final int ruleId, + Injection(final String debugSelector, final Matcher> matcher, final RuleId ruleId, final IRawGrammar grammar, final int priority) { this.debugSelector = debugSelector; this.matcher = matcher; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java index c53997e7c..290062932 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java @@ -35,6 +35,7 @@ import org.eclipse.tm4e.core.internal.rule.CompiledRule; import org.eclipse.tm4e.core.internal.rule.MatchRule; import org.eclipse.tm4e.core.internal.rule.Rule; +import org.eclipse.tm4e.core.internal.rule.RuleId; /** * @see 0 && captureIndices[0].end > linePos; - if (matchedRuleId == -1) { + if (matchedRuleId.equals(RuleId.END_RULE)) { // We matched the `end` for this rule => pop it final BeginEndRule poppedRule = (BeginEndRule) stack.getRule(grammar); @@ -285,7 +287,7 @@ private IMatchResult matchRule(final Grammar grammar, final OnigString lineText, return new IMatchResult() { @Override - public int getMatchedRuleId() { + public RuleId getMatchedRuleId() { return ruleScanner.rules[r.getIndex()]; } @@ -330,7 +332,7 @@ private IMatchResult matchRuleOrInjections(final Grammar grammar, final OnigStri final int injectionResultScore = injectionResult.getCaptureIndices()[0].start; if (injectionResultScore < matchResultScore - || (injectionResult.isPriorityMatch() && injectionResultScore == matchResultScore)) { + || injectionResult.isPriorityMatch() && injectionResultScore == matchResultScore) { // injection won! return injectionResult; } @@ -345,7 +347,7 @@ private IMatchInjectionsResult matchInjections(final List injections, // The lower the better int bestMatchRating = Integer.MAX_VALUE; OnigCaptureIndex[] bestMatchCaptureIndices = null; - int bestMatchRuleId = -1; + RuleId bestMatchRuleId = RuleId.END_RULE; int bestMatchResultPriority = 0; final List scopes = stack.contentNameScopesList.generateScopes(); @@ -388,13 +390,13 @@ private IMatchInjectionsResult matchInjections(final List injections, } if (bestMatchCaptureIndices != null) { - final int matchedRuleId = bestMatchRuleId; + final RuleId matchedRuleId = bestMatchRuleId; final OnigCaptureIndex[] matchCaptureIndices = bestMatchCaptureIndices; final boolean matchResultPriority = bestMatchResultPriority == -1; return new IMatchInjectionsResult() { @Override - public int getMatchedRuleId() { + public RuleId getMatchedRuleId() { return matchedRuleId; } @@ -459,7 +461,7 @@ private void handleCaptures(final Grammar grammar, final OnigString lineText, fi } final var retokenizeCapturedWithRuleId = captureRule.retokenizeCapturedWithRuleId; - if (retokenizeCapturedWithRuleId != null) { + if (retokenizeCapturedWithRuleId.notEquals(RuleId.NO_RULE)) { // the capture requires additional matching final String scopeName = captureRule.getName(lineText.string, captureIndices); final ScopeListElement nameScopesList = stack.contentNameScopesList.push(grammar, scopeName); @@ -470,7 +472,7 @@ private void handleCaptures(final Grammar grammar, final OnigString lineText, fi final StackElement stackClone = stack.push(retokenizeCapturedWithRuleId, captureIndex.start, -1, false, null, nameScopesList, contentNameScopesList); final var onigSubStr = OnigString.of(lineText.string.substring(0, captureIndex.end)); - tokenizeString(grammar, onigSubStr, (isFirstLine && captureIndex.start == 0), + tokenizeString(grammar, onigSubStr, isFirstLine && captureIndex.start == 0, captureIndex.start, stackClone, lineTokens, false); continue; } @@ -521,8 +523,8 @@ private WhileCheckResult checkWhileConditions(final Grammar grammar, final OnigS } if (r != null) { - final int matchedRuleId = ruleScanner.rules[r.getIndex()]; - if (matchedRuleId != -2) { + final RuleId matchedRuleId = ruleScanner.rules[r.getIndex()]; + if (!RuleId.WHILE_RULE.equals(matchedRuleId)) { // we shouldn't end up here stack = castNonNull(whileRule.stack.pop()); break; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/RawRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/RawRule.java index 2cae546ae..e5d972862 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/RawRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/RawRule.java @@ -17,6 +17,7 @@ import org.eclipse.jdt.annotation.Nullable; import org.eclipse.tm4e.core.internal.parser.PropertySettable; +import org.eclipse.tm4e.core.internal.rule.RuleId; import org.eclipse.tm4e.core.internal.types.IRawCaptures; import org.eclipse.tm4e.core.internal.types.IRawRepository; import org.eclipse.tm4e.core.internal.types.IRawRule; @@ -54,12 +55,12 @@ public RawRule deepClone() { @Nullable @Override - public Integer getId() { - return (Integer) get(ID); + public RuleId getId() { + return (RuleId) get(ID); } @Override - public void setId(final Integer id) { + public void setId(final RuleId id) { super.put(ID, id); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StackElement.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StackElement.java index 7d1cbf435..cd956968e 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StackElement.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StackElement.java @@ -26,6 +26,7 @@ import org.eclipse.tm4e.core.grammar.IStackElement; import org.eclipse.tm4e.core.internal.rule.IRuleRegistry; import org.eclipse.tm4e.core.internal.rule.Rule; +import org.eclipse.tm4e.core.internal.rule.RuleId; /** * Represents a "pushed" state on the stack (as a linked list element). @@ -36,7 +37,7 @@ */ public final class StackElement implements IStackElement { - public static final StackElement NULL = new StackElement(null, 0, 0, 0, false, null, + public static final StackElement NULL = new StackElement(null, RuleId.NO_RULE, 0, 0, false, null, new ScopeListElement(null, "", 0), new ScopeListElement(null, "", 0)); /** @@ -67,7 +68,7 @@ public final class StackElement implements IStackElement { /** * The state (rule) that this element represents. */ - final int ruleId; + final RuleId ruleId; /** * The state has entered and captured \n. This means that the next line should have an anchorPosition of 0. @@ -93,7 +94,7 @@ public final class StackElement implements IStackElement { StackElement( @Nullable final StackElement parent, - final int ruleId, + final RuleId ruleId, final int enterPos, final int anchorPos, final boolean beginRuleCapturedEOL, @@ -130,7 +131,7 @@ private static boolean structuralEquals(@Nullable StackElement a, @Nullable Stac return false; } - if (a.depth != b.depth || a.ruleId != b.ruleId || !Objects.equals(a.endRule, b.endRule)) { + if (a.depth != b.depth || !Objects.equals(a.ruleId, b.ruleId) || !Objects.equals(a.endRule, b.endRule)) { return false; } @@ -168,9 +169,8 @@ public int getDepth() { public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + Objects.hash(endRule, parent, contentNameScopesList); + result = prime * result + Objects.hash(endRule, parent, contentNameScopesList, ruleId); result = prime * result + depth; - result = prime * result + ruleId; return result; } @@ -194,7 +194,7 @@ StackElement safePop() { return this; } - StackElement push(final int ruleId, + StackElement push(final RuleId ruleId, final int enterPos, final int anchorPos, final boolean beginRuleCapturedEOL, diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginEndRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginEndRule.java index 79525d380..7ac19145b 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginEndRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginEndRule.java @@ -37,19 +37,19 @@ public final class BeginEndRule extends Rule { private final boolean applyEndPatternLast; final boolean hasMissingPatterns; - final int[] patterns; + final RuleId[] patterns; @Nullable private RegExpSourceList cachedCompiledPatterns; - BeginEndRule(final int id, @Nullable final String name, @Nullable final String contentName, final String begin, - final List<@Nullable CaptureRule> beginCaptures, @Nullable final String end, final List<@Nullable CaptureRule> endCaptures, - final boolean applyEndPatternLast, + BeginEndRule(final RuleId id, @Nullable final String name, @Nullable final String contentName, final String begin, + final List<@Nullable CaptureRule> beginCaptures, @Nullable final String end, + final List<@Nullable CaptureRule> endCaptures, final boolean applyEndPatternLast, final CompilePatternsResult patterns) { super(id, name, contentName); this.begin = new RegExpSource(begin, this.id); this.beginCaptures = beginCaptures; - this.end = new RegExpSource(end == null ? "\uFFFF" : end, -1); + this.end = new RegExpSource(end == null ? "\uFFFF" : end, RuleId.END_RULE); this.endHasBackReferences = this.end.hasBackReferences; this.endCaptures = endCaptures; this.applyEndPatternLast = applyEndPatternLast; @@ -65,7 +65,7 @@ public String getEndWithResolvedBackReferences(final String lineText, final Onig public void collectPatternsRecursive(final IRuleRegistry grammar, final RegExpSourceList out, final boolean isFirst) { if (isFirst) { - for (final int pattern : this.patterns) { + for (final RuleId pattern : this.patterns) { final Rule rule = grammar.getRule(pattern); rule.collectPatternsRecursive(grammar, out, false); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginWhileRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginWhileRule.java index e8948f8be..1b51c8aa5 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginWhileRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginWhileRule.java @@ -34,7 +34,7 @@ public final class BeginWhileRule extends Rule { private final RegExpSource _while; public final boolean whileHasBackReferences; final boolean hasMissingPatterns; - final int[] patterns; + final RuleId[] patterns; @Nullable private RegExpSourceList cachedCompiledPatterns; @@ -42,14 +42,14 @@ public final class BeginWhileRule extends Rule { @Nullable private RegExpSourceList cachedCompiledWhilePatterns; - BeginWhileRule(final int id, @Nullable final String name, @Nullable final String contentName, final String begin, - final List<@Nullable CaptureRule> beginCaptures, final String _while, final List<@Nullable CaptureRule> whileCaptures, - final CompilePatternsResult patterns) { + BeginWhileRule(final RuleId id, @Nullable final String name, @Nullable final String contentName, final String begin, + final List<@Nullable CaptureRule> beginCaptures, final String _while, + final List<@Nullable CaptureRule> whileCaptures, final CompilePatternsResult patterns) { super(/* $location, */id, name, contentName); this.begin = new RegExpSource(begin, this.id); this.beginCaptures = beginCaptures; this.whileCaptures = whileCaptures; - this._while = new RegExpSource(_while, -2); + this._while = new RegExpSource(_while, RuleId.WHILE_RULE); this.whileHasBackReferences = this._while.hasBackReferences; this.patterns = patterns.patterns; this.hasMissingPatterns = patterns.hasMissingPatterns; @@ -60,10 +60,11 @@ public String getWhileWithResolvedBackReferences(final String lineText, final On } @Override - public void collectPatternsRecursive(final IRuleRegistry grammar, final RegExpSourceList out, final boolean isFirst) { + public void collectPatternsRecursive(final IRuleRegistry grammar, final RegExpSourceList out, + final boolean isFirst) { if (isFirst) { Rule rule; - for (final int pattern : patterns) { + for (final RuleId pattern : patterns) { rule = grammar.getRule(pattern); rule.collectPatternsRecursive(grammar, out, false); } @@ -78,7 +79,8 @@ public CompiledRule compile(final IRuleRegistry grammar, @Nullable final String } @Override - public CompiledRule compileAG(final IRuleRegistry grammar, @Nullable final String endRegexSource, final boolean allowA, + public CompiledRule compileAG(final IRuleRegistry grammar, @Nullable final String endRegexSource, + final boolean allowA, final boolean allowG) { return getCachedCompiledPatterns(grammar).compileAG(allowA, allowG); } @@ -97,7 +99,8 @@ public CompiledRule compileWhile(@Nullable final String endRegexSource) { return getCachedCompiledWhilePatterns(endRegexSource).compile(); } - public CompiledRule compileWhileAG(@Nullable final String endRegexSource, final boolean allowA, final boolean allowG) { + public CompiledRule compileWhileAG(@Nullable final String endRegexSource, final boolean allowA, + final boolean allowG) { return getCachedCompiledWhilePatterns(endRegexSource).compileAG(allowA, allowG); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CaptureRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CaptureRule.java index 991bea032..e1b3cc46a 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CaptureRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CaptureRule.java @@ -25,17 +25,17 @@ */ public final class CaptureRule extends Rule { - @Nullable - public final Integer retokenizeCapturedWithRuleId; + public final RuleId retokenizeCapturedWithRuleId; - CaptureRule(final int id, @Nullable final String name, @Nullable final String contentName, - @Nullable final Integer retokenizeCapturedWithRuleId) { + CaptureRule(final RuleId id, @Nullable final String name, @Nullable final String contentName, + final RuleId retokenizeCapturedWithRuleId) { super(id, name, contentName); this.retokenizeCapturedWithRuleId = retokenizeCapturedWithRuleId; } @Override - public void collectPatternsRecursive(final IRuleRegistry grammar, final RegExpSourceList out, final boolean isFirst) { + public void collectPatternsRecursive(final IRuleRegistry grammar, final RegExpSourceList out, + final boolean isFirst) { throw new UnsupportedOperationException(); } @@ -45,7 +45,8 @@ public CompiledRule compile(final IRuleRegistry grammar, @Nullable final String } @Override - public CompiledRule compileAG(final IRuleRegistry grammar, @Nullable final String endRegexSource, final boolean allowA, + public CompiledRule compileAG(final IRuleRegistry grammar, @Nullable final String endRegexSource, + final boolean allowA, final boolean allowG) { throw new UnsupportedOperationException(); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CompilePatternsResult.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CompilePatternsResult.java index 582122ab8..88e808eb9 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CompilePatternsResult.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CompilePatternsResult.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2015-2017 Angelo ZERR. + * Copyright (c) 2015-2017 Angelo ZERR. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -11,8 +11,8 @@ * Initial license: MIT * * Contributors: - * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license - * - Angelo Zerr - translation and adaptation to Java + * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license + * - Angelo Zerr - translation and adaptation to Java */ package org.eclipse.tm4e.core.internal.rule; @@ -23,12 +23,11 @@ */ final class CompilePatternsResult { - final int[] patterns; + final RuleId[] patterns; final boolean hasMissingPatterns; - CompilePatternsResult(final int[] patterns, final boolean hasMissingPatterns) { + CompilePatternsResult(final RuleId[] patterns, final boolean hasMissingPatterns) { this.hasMissingPatterns = hasMissingPatterns; this.patterns = patterns; } - } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CompiledRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CompiledRule.java index 32d94b68a..1b89fe83a 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CompiledRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CompiledRule.java @@ -29,9 +29,9 @@ public final class CompiledRule { public final List debugRegExps; public final OnigScanner scanner; - public final int[] rules; + public final RuleId[] rules; - CompiledRule(final List regExps, final int[] rules) { + CompiledRule(final List regExps, final RuleId[] rules) { this.debugRegExps = regExps; this.rules = rules; this.scanner = new OnigScanner(regExps); diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IRuleRegistry.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IRuleRegistry.java index c89bed843..e0aa4c584 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IRuleRegistry.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IRuleRegistry.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2015-2017 Angelo ZERR. + * Copyright (c) 2015-2017 Angelo ZERR. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -11,12 +11,12 @@ * Initial license: MIT * * Contributors: - * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license - * - Angelo Zerr - translation and adaptation to Java + * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license + * - Angelo Zerr - translation and adaptation to Java */ package org.eclipse.tm4e.core.internal.rule; -import java.util.function.IntFunction; +import java.util.function.Function; /** * @see T registerRule(IntFunction factory); + T registerRule(Function factory); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IncludeOnlyRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IncludeOnlyRule.java index 5e4b57a65..33b98d2ff 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IncludeOnlyRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IncludeOnlyRule.java @@ -26,12 +26,12 @@ final class IncludeOnlyRule extends Rule { final boolean hasMissingPatterns; - final int[] patterns; + final RuleId[] patterns; @Nullable private RegExpSourceList cachedCompiledPatterns; - IncludeOnlyRule(final int id, @Nullable final String name, @Nullable final String contentName, + IncludeOnlyRule(final RuleId id, @Nullable final String name, @Nullable final String contentName, final CompilePatternsResult patterns) { super(id, name, contentName); this.patterns = patterns.patterns; @@ -41,7 +41,7 @@ final class IncludeOnlyRule extends Rule { @Override public void collectPatternsRecursive(final IRuleRegistry grammar, final RegExpSourceList out, final boolean isFirst) { - for (final int pattern : this.patterns) { + for (final RuleId pattern : this.patterns) { final Rule rule = grammar.getRule(pattern); rule.collectPatternsRecursive(grammar, out, false); } @@ -53,7 +53,8 @@ public CompiledRule compile(final IRuleRegistry grammar, @Nullable final String } @Override - public CompiledRule compileAG(final IRuleRegistry grammar, @Nullable final String endRegexSource, final boolean allowA, + public CompiledRule compileAG(final IRuleRegistry grammar, @Nullable final String endRegexSource, + final boolean allowA, final boolean allowG) { return getCachedCompiledPatterns(grammar).compileAG(allowA, allowG); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/MatchRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/MatchRule.java index 3d71100f1..9fd051e73 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/MatchRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/MatchRule.java @@ -33,7 +33,8 @@ public final class MatchRule extends Rule { @Nullable private RegExpSourceList cachedCompiledPatterns; - MatchRule(final int id, @Nullable final String name, final String match, final List<@Nullable CaptureRule> captures) { + MatchRule(final RuleId id, @Nullable final String name, final String match, + final List<@Nullable CaptureRule> captures) { super(id, name, null); this.match = new RegExpSource(match, this.id); this.captures = captures; @@ -51,8 +52,8 @@ public CompiledRule compile(final IRuleRegistry grammar, @Nullable final String } @Override - public CompiledRule compileAG(final IRuleRegistry grammar, @Nullable final String endRegexSource, final boolean allowA, - final boolean allowG) { + public CompiledRule compileAG(final IRuleRegistry grammar, @Nullable final String endRegexSource, + final boolean allowA, final boolean allowG) { return getCachedCompiledPatterns(grammar).compileAG(allowA, allowG); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RegExpSource.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RegExpSource.java index 0d1bbc3a4..b32ca4753 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RegExpSource.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RegExpSource.java @@ -36,16 +36,16 @@ final class RegExpSource { private static final Pattern BACK_REFERENCING_END = Pattern.compile("\\\\(\\d+)"); private String source; - final int ruleId; + final RuleId ruleId; final boolean hasBackReferences; private String @Nullable [][] anchorCache; - RegExpSource(final String regExpSource, final int ruleId) { + RegExpSource(final String regExpSource, final RuleId ruleId) { this(regExpSource, ruleId, true); } - RegExpSource(final String regExpSource, final int ruleId, final boolean handleAnchors) { + RegExpSource(final String regExpSource, final RuleId ruleId, final boolean handleAnchors) { if (handleAnchors && !regExpSource.isEmpty()) { final int len = regExpSource.length(); int lastPushedPos = 0; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RegExpSourceList.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RegExpSourceList.java index 5e6d71733..03ab1b017 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RegExpSourceList.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RegExpSourceList.java @@ -75,7 +75,7 @@ CompiledRule compile() { var cached = this.cached; if (cached == null) { final List regexps = items.stream().map(RegExpSource::getSource).collect(Collectors.toList()); - cached = this.cached = new CompiledRule(regexps, getRules()); + cached = this.cached = new CompiledRule(regexps, items.stream().map(e -> e.ruleId).toArray(RuleId[]::new)); } return cached; } @@ -98,14 +98,6 @@ CompiledRule compileAG(final boolean allowA, final boolean allowG) { private CompiledRule resolveAnchors(final boolean allowA, final boolean allowG) { final List regexps = items.stream().map(e -> e.resolveAnchors(allowA, allowG)) .collect(Collectors.toList()); - return new CompiledRule(regexps, getRules()); - } - - private int[] getRules() { - final var ruleIds = new int[items.size()]; - for (int i = 0; i < ruleIds.length; i++) { - ruleIds[i] = items.get(i).ruleId; - } - return ruleIds; + return new CompiledRule(regexps, items.stream().map(e -> e.ruleId).toArray(RuleId[]::new)); } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/Rule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/Rule.java index ede8f48a2..7a0fd9a81 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/Rule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/Rule.java @@ -27,7 +27,7 @@ */ public abstract class Rule { - final int id; + final RuleId id; @Nullable private final String name; @@ -37,7 +37,7 @@ public abstract class Rule { private final String contentName; private final boolean contentNameIsCapturing; - Rule(final int id, @Nullable final String name, final @Nullable String contentName) { + Rule(final RuleId id, @Nullable final String name, final @Nullable String contentName) { this.id = id; this.name = name; this.nameIsCapturing = RegexSource.hasCaptures(name); diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java index 9372092ac..7508c4dcc 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java @@ -43,11 +43,12 @@ public final class RuleFactory { private static final Logger LOGGER = System.getLogger(RuleFactory.class.getName()); private static CaptureRule createCaptureRule(final IRuleFactoryHelper helper, @Nullable final String name, - @Nullable final String contentName, @Nullable final Integer retokenizeCapturedWithRuleId) { - return helper.registerRule(id -> new CaptureRule(id, name, contentName, retokenizeCapturedWithRuleId)); + @Nullable final String contentName, final RuleId retokenizeCapturedWithRuleId) { + return helper + .registerRule(id -> new CaptureRule(id, name, contentName, retokenizeCapturedWithRuleId)); } - public static int getCompiledRuleId(final IRawRule desc, final IRuleFactoryHelper helper, + public static RuleId getCompiledRuleId(final IRawRule desc, final IRuleFactoryHelper helper, final IRawRepository repository) { if (desc.getId() == null) { helper.registerRule(ruleId -> { @@ -137,8 +138,8 @@ begin, compileCaptures( for (final String captureId : captures.getCaptureIds()) { final int numericCaptureId = parseInt(captureId, 10); final IRawRule rule = captures.getCapture(captureId); - final Integer retokenizeCapturedWithRuleId = rule.getPatterns() == null - ? null + final RuleId retokenizeCapturedWithRuleId = rule.getPatterns() == null + ? RuleId.NO_RULE : getCompiledRuleId(captures.getCapture(captureId), helper, repository); r.set(numericCaptureId, createCaptureRule(helper, rule.getName(), rule.getContentName(), retokenizeCapturedWithRuleId)); @@ -157,31 +158,29 @@ private static int parseInt(final String string, final int base) { private static CompilePatternsResult compilePatterns(@Nullable final Collection patterns, final IRuleFactoryHelper helper, final IRawRepository repository) { if (patterns == null) { - return new CompilePatternsResult(new int[0], false); + return new CompilePatternsResult(new RuleId[0], false); } - final var r = new ArrayList(); + final var r = new ArrayList(); for (final IRawRule pattern : patterns) { - int patternId = -1; + RuleId ruleId = null; final var patternInclude = pattern.getInclude(); - if (patternInclude == null) { - patternId = getCompiledRuleId(pattern, helper, repository); - } else { + if (patternInclude != null) { if (patternInclude.charAt(0) == '#') { // Local include found in `repository` final IRawRule localIncludedRule = repository.getRule(patternInclude.substring(1)); if (localIncludedRule != null) { - patternId = getCompiledRuleId(localIncludedRule, helper, repository); + ruleId = getCompiledRuleId(localIncludedRule, helper, repository); } else if (LOGGER.isLoggable(DEBUG)) { LOGGER.log(DEBUG, "CANNOT find rule for scopeName: %s, I am: %s", patternInclude, repository.getBase().getName()); } - } else if (patternInclude.equals(RawRepository.DOLLAR_BASE)) { // Special include also found in - // `repository` - patternId = getCompiledRuleId(repository.getBase(), helper, repository); - } else if (patternInclude.equals(RawRepository.DOLLAR_SELF)) { // Special include also found in - // `repository` - patternId = getCompiledRuleId(repository.getSelf(), helper, repository); + } else if (patternInclude.equals(RawRepository.DOLLAR_BASE)) { + // Special include also found in `repository` + ruleId = getCompiledRuleId(repository.getBase(), helper, repository); + } else if (patternInclude.equals(RawRepository.DOLLAR_SELF)) { + // Special include also found in `repository` + ruleId = getCompiledRuleId(repository.getSelf(), helper, repository); } else { final String externalGrammarName; final String externalGrammarInclude; @@ -201,25 +200,27 @@ private static CompilePatternsResult compilePatterns(@Nullable final Collection< if (externalGrammarInclude != null) { final IRawRule externalIncludedRule = externalGrammarRepo.getRule(externalGrammarInclude); if (externalIncludedRule != null) { - patternId = getCompiledRuleId(externalIncludedRule, helper, externalGrammarRepo); + ruleId = getCompiledRuleId(externalIncludedRule, helper, externalGrammarRepo); } else if (LOGGER.isLoggable(DEBUG)) { LOGGER.log(DEBUG, "CANNOT find rule for scopeName: %s, I am: %s", patternInclude, repository.getBase().getName()); } } else { - patternId = getCompiledRuleId(externalGrammarRepo.getSelf(), helper, externalGrammarRepo); + ruleId = getCompiledRuleId(externalGrammarRepo.getSelf(), helper, externalGrammarRepo); } } else if (LOGGER.isLoggable(DEBUG)) { LOGGER.log(DEBUG, "CANNOT find grammar for scopeName: %s, I am: %s", patternInclude, repository.getBase().getName()); } } + } else { + ruleId = getCompiledRuleId(pattern, helper, repository); } - if (patternId != -1) { + if (ruleId != null) { Rule rule; try { - rule = helper.getRule(patternId); + rule = helper.getRule(ruleId); } catch (final IndexOutOfBoundsException ex) { rule = null; if (patternInclude != null) { @@ -250,11 +251,13 @@ private static CompilePatternsResult compilePatterns(@Nullable final Collection< continue; } - r.add(patternId); + r.add(ruleId); } } - return new CompilePatternsResult(r.stream().mapToInt(Integer::intValue).toArray(), patterns.size() != r.size()); + return new CompilePatternsResult( + r.toArray(RuleId[]::new), + patterns.size() != r.size()); } private RuleFactory() { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleId.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleId.java new file mode 100644 index 000000000..4f1fc8482 --- /dev/null +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleId.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) 2022 Sebastian Thomschke and others. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. + * Initial license: MIT + * + * Contributors: + * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license + * - Sebastian Thomschke - translation and adaptation to Java + */ +package org.eclipse.tm4e.core.internal.rule; + +import org.eclipse.jdt.annotation.Nullable; + +public final class RuleId { + + public static final RuleId NO_RULE = new RuleId(0); + + /** + * This is a special constant to indicate that the end regexp matched. + */ + public static final RuleId END_RULE = new RuleId(-1); + + /** + * This is a special constant to indicate that the while regexp matched. + */ + public static final RuleId WHILE_RULE = new RuleId(-2); + + public static RuleId of(final int id) { + if (id < 0) + throw new IllegalArgumentException("[id] must be > 0"); + return new RuleId(id); + } + + public final int id; + + private RuleId(final int id) { + this.id = id; + } + + @Override + public boolean equals(@Nullable final Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (RuleId.class != obj.getClass()) + return false; + final var other = (RuleId) obj; + return id == other.id; + } + + public boolean equals(final RuleId otherRule) { + return id == otherRule.id; + } + + public boolean notEquals(final RuleId otherRule) { + return id != otherRule.id; + } + + @Override + public int hashCode() { + return id; + } + + @Override + public String toString() { + return Integer.toString(id); + } +} diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawRule.java index db38f861d..749b1209f 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawRule.java @@ -19,13 +19,14 @@ import java.util.Collection; import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.tm4e.core.internal.rule.RuleId; public interface IRawRule { @Nullable - Integer getId(); + RuleId getId(); - void setId(Integer id); + void setId(RuleId id); @Nullable String getInclude(); From 7c06fbea30c2c429beeaab9e246971bb97ec4392 Mon Sep 17 00:00:00 2001 From: sebthom Date: Sun, 15 May 2022 16:27:13 +0200 Subject: [PATCH 02/41] Minor update --- .../core/internal/grammar/BalancedBracketSelectors.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BalancedBracketSelectors.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BalancedBracketSelectors.java index 6c33439ae..8a3e3dee9 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BalancedBracketSelectors.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BalancedBracketSelectors.java @@ -35,13 +35,13 @@ public class BalancedBracketSelectors { this.allowAny = true; return Stream.empty(); } - return Matcher.createMatchers(selector).stream(); + return Matcher.createMatchers(selector).stream().map(m -> m.matcher); }) - .map(m -> m.matcher).toArray(Matcher[]::new); + .toArray(Matcher[]::new); this.unbalancedBracketScopes = unbalancedBracketScopes.stream() - .flatMap(selector -> Matcher.createMatchers(selector).stream()) - .map(m -> m.matcher).toArray(Matcher[]::new); + .flatMap(selector -> Matcher.createMatchers(selector).stream().map(m -> m.matcher)) + .toArray(Matcher[]::new); } boolean matchesAlways() { From e7198b3572a14e46ac7afa550810c87200635c03 Mon Sep 17 00:00:00 2001 From: sebthom Date: Sun, 15 May 2022 17:05:11 +0200 Subject: [PATCH 03/41] Set missing Java 17 constraints --- .../.settings/org.eclipse.jdt.core.prefs | 6 +++--- .../META-INF/MANIFEST.MF | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +++--- org.eclipse.tm4e.markdown/META-INF/MANIFEST.MF | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +++--- org.eclipse.tm4e.ui.tests/META-INF/MANIFEST.MF | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/org.eclipse.tm4e.languageconfiguration.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.tm4e.languageconfiguration.tests/.settings/org.eclipse.jdt.core.prefs index f648802b5..75d30254f 100644 --- a/org.eclipse.tm4e.languageconfiguration.tests/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.tm4e.languageconfiguration.tests/.settings/org.eclipse.jdt.core.prefs @@ -11,9 +11,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -129,7 +129,7 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false diff --git a/org.eclipse.tm4e.languageconfiguration.tests/META-INF/MANIFEST.MF b/org.eclipse.tm4e.languageconfiguration.tests/META-INF/MANIFEST.MF index a82f9622a..ad7dcb179 100644 --- a/org.eclipse.tm4e.languageconfiguration.tests/META-INF/MANIFEST.MF +++ b/org.eclipse.tm4e.languageconfiguration.tests/META-INF/MANIFEST.MF @@ -5,7 +5,7 @@ Bundle-SymbolicName: org.eclipse.tm4e.languageconfiguration.tests;singleton:=tru Bundle-Version: 0.2.1.qualifier Bundle-Vendor: Eclipse TM4E Automatic-Module-Name: org.eclipse.tm4e.languageconfiguration.tests -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Require-Bundle: org.junit;bundle-version="4.12.0", org.eclipse.tm4e.languageconfiguration;bundle-version="0.3.0", org.eclipse.ui.genericeditor;bundle-version="1.1", diff --git a/org.eclipse.tm4e.markdown/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.tm4e.markdown/.settings/org.eclipse.jdt.core.prefs index 6b99f88fc..8f539ddf1 100644 --- a/org.eclipse.tm4e.markdown/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.tm4e.markdown/.settings/org.eclipse.jdt.core.prefs @@ -11,9 +11,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -129,7 +129,7 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false diff --git a/org.eclipse.tm4e.markdown/META-INF/MANIFEST.MF b/org.eclipse.tm4e.markdown/META-INF/MANIFEST.MF index c360c765f..d82a99c60 100644 --- a/org.eclipse.tm4e.markdown/META-INF/MANIFEST.MF +++ b/org.eclipse.tm4e.markdown/META-INF/MANIFEST.MF @@ -10,7 +10,7 @@ Require-Bundle: org.eclipse.core.runtime, org.eclipse.tm4e.registry;bundle-version="0.5.1", org.eclipse.tm4e.ui;bundle-version="0.5.1", com.google.guava;bundle-version="30.1.0" -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Export-Package: org.eclipse.tm4e.markdown, org.eclipse.tm4e.markdown.marked Bundle-ActivationPolicy: lazy diff --git a/org.eclipse.tm4e.ui.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.tm4e.ui.tests/.settings/org.eclipse.jdt.core.prefs index f648802b5..75d30254f 100644 --- a/org.eclipse.tm4e.ui.tests/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.tm4e.ui.tests/.settings/org.eclipse.jdt.core.prefs @@ -11,9 +11,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -129,7 +129,7 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false diff --git a/org.eclipse.tm4e.ui.tests/META-INF/MANIFEST.MF b/org.eclipse.tm4e.ui.tests/META-INF/MANIFEST.MF index 60fffffa8..c2aa5b41a 100644 --- a/org.eclipse.tm4e.ui.tests/META-INF/MANIFEST.MF +++ b/org.eclipse.tm4e.ui.tests/META-INF/MANIFEST.MF @@ -21,7 +21,7 @@ Require-Bundle: org.eclipse.tm4e.core, org.eclipse.ui.tests.harness;bundle-version="1.4.0", org.eclipse.tm4e.registry;bundle-version="0.1.0", org.eclipse.ui.editors -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-ActivationPolicy: lazy Import-Package: org.eclipse.core.filebuffers Automatic-Module-Name: org.eclipse.tm4e.ui.tests From 828edd841274c7419620738a6591fc8a8b56e02c Mon Sep 17 00:00:00 2001 From: sebthom Date: Sun, 15 May 2022 17:05:31 +0200 Subject: [PATCH 04/41] Remove unused import --- .../src/main/java/org/eclipse/tm4e/core/registry/Registry.java | 1 - 1 file changed, 1 deletion(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/Registry.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/Registry.java index f86bf291c..8c7c331b5 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/Registry.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/Registry.java @@ -20,7 +20,6 @@ import java.io.FileInputStream; import java.io.InputStream; import java.util.ArrayList; -import java.util.List; import java.util.Map; import java.util.Set; From 8edb65cd4de8990cd3b4d849436c763048fdd5d5 Mon Sep 17 00:00:00 2001 From: sebthom Date: Sun, 15 May 2022 17:07:08 +0200 Subject: [PATCH 05/41] Reduce formatter indention --- .../.settings/org.eclipse.jdt.core.prefs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.eclipse.tm4e.core.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.tm4e.core.tests/.settings/org.eclipse.jdt.core.prefs index 300d8f2ff..516523e69 100644 --- a/org.eclipse.tm4e.core.tests/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.tm4e.core.tests/.settings/org.eclipse.jdt.core.prefs @@ -233,8 +233,8 @@ org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=true org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=2 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.continuation_indentation=1 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=1 org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false From 02fe725c71a22c2dbadc7e5f1fba5a2e0a940a1b Mon Sep 17 00:00:00 2001 From: sebthom Date: Sun, 15 May 2022 17:26:01 +0200 Subject: [PATCH 06/41] Refactor theme tests --- .../internal/theme/AbstractThemeTest.java | 70 +++ .../internal/theme/ThemeMatchingTest.java | 265 ++++----- .../core/internal/theme/ThemeParsingTest.java | 72 ++- .../internal/theme/ThemeResolvingTest.java | 536 +++++++++--------- 4 files changed, 508 insertions(+), 435 deletions(-) create mode 100644 org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/AbstractThemeTest.java diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/AbstractThemeTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/AbstractThemeTest.java new file mode 100644 index 000000000..78ba8188f --- /dev/null +++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/AbstractThemeTest.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2022 Sebastian Thomschke and others. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. + * Initial license: MIT + * + * Contributors: + * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license + * - Sebastian Thomschke - translation and adaptation to Java + */ +package org.eclipse.tm4e.core.internal.theme; + +import java.io.ByteArrayInputStream; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.tm4e.core.internal.theme.reader.ThemeReader; + +public abstract class AbstractThemeTest { + + protected static final int _NOT_SET = 0; + + protected static List list(@SuppressWarnings("unchecked") final T... items) { + if (items.length == 0) + return Collections.emptyList(); + return Arrays.asList(items); + } + + @SuppressWarnings("unchecked") + protected static Map map(final K k, final V v, final Object... moreKVs) { + final var map = new HashMap(); + map.put(k, v); + if (moreKVs.length == 0) + return map; + boolean nextIsValue = false; + K key = null; + for (final Object obj : moreKVs) + if (nextIsValue) { + map.put(key, (V) obj); + nextIsValue = false; + } else { + key = (K) obj; + nextIsValue = true; + } + return map; + } + + protected static Theme createTheme(final ParsedThemeRule... rules) { + return Theme.createFromParsedTheme(list(rules), null); + } + + protected static Theme createTheme(final String themeAsJsonString) throws Exception { + return Theme.createFromRawTheme( + ThemeReader.readThemeSync("theme.json", new ByteArrayInputStream(themeAsJsonString.getBytes())), null); + } + + protected static List parseTheme(final String theme) throws Exception { + return Theme.parseTheme(ThemeReader.readThemeSync("theme.json", new ByteArrayInputStream(theme.getBytes()))); + } +} diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java index 302a6dfbf..1845019e5 100644 --- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java +++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java @@ -11,119 +11,111 @@ */ package org.eclipse.tm4e.core.internal.theme; +import static org.eclipse.tm4e.core.internal.theme.FontStyle.*; import static org.junit.jupiter.api.Assertions.*; -import java.io.ByteArrayInputStream; -import java.util.Arrays; -import java.util.List; - import org.eclipse.tm4e.core.internal.grammar.ScopeListElement; import org.eclipse.tm4e.core.internal.grammar.ScopeMetadata; import org.eclipse.tm4e.core.internal.grammar.StackElementMetadata; -import org.eclipse.tm4e.core.internal.theme.reader.ThemeReader; import org.junit.jupiter.api.Test; /** - * * @see * github.com/Microsoft/vscode-textmate/blob/master/src/tests/themes.test.ts - * */ -class ThemeMatchingTest { +class ThemeMatchingTest extends AbstractThemeTest { + /** + * test: Theme matching gives higher priority to deeper matches + */ @Test void testGivesHigherPriorityToDeeperMatches() throws Exception { - final Theme theme = loadTheme("{" + - "\"settings\": ["+ - "{ \"settings\": { \"foreground\": \"#100000\", \"background\": \"#200000\" } },"+ - "{ \"scope\": \"punctuation.definition.string.begin.html\", \"settings\": { \"foreground\": \"#300000\" } },"+ - "{ \"scope\": \"meta.tag punctuation.definition.string\", \"settings\": { \"foreground\": \"#400000\" } }"+ - "]"+ - "}"); - + final Theme theme = createTheme(""" + {"settings": [ + { "settings": { "foreground": "#100000", "background": "#200000" } }, + { "scope": "punctuation.definition.string.begin.html", "settings": { "foreground": "#300000" } }, + { "scope": "meta.tag punctuation.definition.string", "settings": { "foreground": "#400000" } } + ]}"""); final ColorMap colorMap = new ColorMap(); - final int _NOT_SET = 0; final int _A = colorMap.getId("#100000"); final int _B = colorMap.getId("#200000"); final int _C = colorMap.getId("#400000"); final int _D = colorMap.getId("#300000"); - final List actual = theme.match("punctuation.definition.string.begin.html"); - - assertArrayEquals( - new ThemeTrieElementRule[] { new ThemeTrieElementRule(5, null, FontStyle.NotSet, _D, _NOT_SET), - new ThemeTrieElementRule(3, Arrays.asList("meta.tag"), FontStyle.NotSet, _C, _NOT_SET) }, - actual.toArray()); + assertMatch(theme, "punctuation.definition.string.begin.html", + new ThemeTrieElementRule(5, null, NotSet, _D, _NOT_SET), + new ThemeTrieElementRule(3, list("meta.tag"), NotSet, _C, _NOT_SET)); } + /** + * test: Theme matching gives higher priority to parent matches 1 + */ @Test void testGivesHigherPriorityToParentMatches1() throws Exception { - final Theme theme = loadTheme("{" + - "\"settings\": ["+ - "{ \"settings\": { \"foreground\": \"#100000\", \"background\": \"#200000\" } },"+ - "{ \"scope\": \"c a\", \"settings\": { \"foreground\": \"#300000\" } },"+ - "{ \"scope\": \"d a.b\", \"settings\": { \"foreground\": \"#400000\" } },"+ - "{ \"scope\": \"a\", \"settings\": { \"foreground\": \"#500000\" } }"+ - "]"+ - "}"); - + final Theme theme = createTheme(""" + {"settings": [ + { "settings": { "foreground": "#100000", "background": "#200000" } }, + { "scope": "c a", "settings": { "foreground": "#300000" } }, + { "scope": "d a.b", "settings": { "foreground": "#400000" } }, + { "scope": "a", "settings": { "foreground": "#500000" } } + ]}"""); final ColorMap colorMap = new ColorMap(); - final int _NOT_SET = 0; final int _A = colorMap.getId("#100000"); final int _B = colorMap.getId("#200000"); final int _C = colorMap.getId("#500000"); final int _D = colorMap.getId("#300000"); final int _E = colorMap.getId("#400000"); - final List actual = theme.match("a.b"); - - assertArrayEquals(new ThemeTrieElementRule[] { - new ThemeTrieElementRule(2, Arrays.asList("d"), FontStyle.NotSet, _E, _NOT_SET), - new ThemeTrieElementRule(1, Arrays.asList("c"), FontStyle.NotSet, _D, _NOT_SET), - new ThemeTrieElementRule(1, null, FontStyle.NotSet, _C, _NOT_SET) }, actual.toArray()); + assertMatch(theme, "a.b", + new ThemeTrieElementRule(2, list("d"), NotSet, _E, _NOT_SET), + new ThemeTrieElementRule(1, list("c"), NotSet, _D, _NOT_SET), + new ThemeTrieElementRule(1, null, NotSet, _C, _NOT_SET)); } + /** + * test: Theme matching gives higher priority to parent matches 2 + */ @Test void testGivesHigherPriorityToParentMatches2() throws Exception { - final Theme theme = loadTheme("{" + - "\"settings\": ["+ - "{ \"settings\": { \"foreground\": \"#100000\", \"background\": \"#200000\" } },"+ - "{ \"scope\": \"meta.tag entity\", \"settings\": { \"foreground\": \"#300000\" } },"+ - "{ \"scope\": \"meta.selector.css entity.name.tag\", \"settings\": { \"foreground\": \"#400000\" } },"+ - "{ \"scope\": \"entity\", \"settings\": { \"foreground\": \"#500000\" } }"+ - "]"+ - "}"); - + final Theme theme = createTheme(""" + {"settings": [ + { "settings": { "foreground": "#100000", "background": "#200000" } }, + { "scope": "meta.tag entity", "settings": { "foreground": "#300000" } }, + { "scope": "meta.selector.css entity.name.tag", "settings": { "foreground": "#400000" } }, + { "scope": "entity", "settings": { "foreground": "#500000" } } + ]}"""); final var root = new ScopeListElement(null, "text.html.cshtml", 0); final var parent = new ScopeListElement(root, "meta.tag.structure.any.html", 0); - final int r = ScopeListElement.mergeMetadata(0, parent, new ScopeMetadata("entity.name.tag.structure.any.html", 0, 0, + final int r = ScopeListElement.mergeMetadata(0, parent, + new ScopeMetadata("entity.name.tag.structure.any.html", 0, 0, theme.match("entity.name.tag.structure.any.html"))); final String color = theme.getColor(StackElementMetadata.getForeground(r)); assertEquals("#300000", color); } + /** + * test: Theme matching can match + */ @Test void testCanMatch() throws Exception { - final Theme theme = loadTheme("{" + - "\"settings\": ["+ - "{ \"settings\": { \"foreground\": \"#F8F8F2\", \"background\": \"#272822\" } },"+ - "{ \"scope\": \"source, something\", \"settings\": { \"background\": \"#100000\" } },"+ - "{ \"scope\": [\"bar\", \"baz\"], \"settings\": { \"background\": \"#200000\" } },"+ - "{ \"scope\": \"source.css selector bar\", \"settings\": { \"fontStyle\": \"bold\" } },"+ - "{ \"scope\": \"constant\", \"settings\": { \"fontStyle\": \"italic\", \"foreground\": \"#300000\" } },"+ - "{ \"scope\": \"constant.numeric\", \"settings\": { \"foreground\": \"#400000\" } },"+ - "{ \"scope\": \"constant.numeric.hex\", \"settings\": { \"fontStyle\": \"bold\" } },"+ - "{ \"scope\": \"constant.numeric.oct\", \"settings\": { \"fontStyle\": \"bold italic underline\" } },"+ - "{ \"scope\": \"constant.numeric.dec\", \"settings\": { \"fontStyle\": \"\", \"foreground\": \"#500000\" } },"+ - "{ \"scope\": \"storage.object.bar\", \"settings\": { \"fontStyle\": \"\", \"foreground\": \"#600000\" } }"+ - "]"+ - "}"); + final Theme theme = createTheme(""" + {"settings": [ + { "settings": { "foreground": "#F8F8F2", "background": "#272822" } }, + { "scope": "source, something", "settings": { "background": "#100000" } }, + { "scope": ["bar", "baz"], "settings": { "background": "#200000" } }, + { "scope": "source.css selector bar", "settings": { "fontStyle": "bold" } }, + { "scope": "constant", "settings": { "fontStyle": "italic", "foreground": "#300000" } }, + { "scope": "constant.numeric", "settings": { "foreground": "#400000" } }, + { "scope": "constant.numeric.hex", "settings": { "fontStyle": "bold" } }, + { "scope": "constant.numeric.oct", "settings": { "fontStyle": "bold italic underline" } }, + { "scope": "constant.numeric.dec", "settings": { "fontStyle": "", "foreground": "#500000" } }, + { "scope": "storage.object.bar", "settings": { "fontStyle": "", "foreground": "#600000" } } + ]}"""); final ColorMap colorMap = new ColorMap(); - final int _NOT_SET = 0; final int _A = colorMap.getId("#F8F8F2"); final int _B = colorMap.getId("#272822"); final int _C = colorMap.getId("#200000"); @@ -139,87 +131,85 @@ void testCanMatch() throws Exception { assertNoMatch(theme, "asdfg"); // matches source - assertSimpleMatch(theme, "source", 1, FontStyle.NotSet, _NOT_SET, _G); - assertSimpleMatch(theme, "source.ts", 1, FontStyle.NotSet, _NOT_SET, _G); - assertSimpleMatch(theme, "source.tss", 1, FontStyle.NotSet, _NOT_SET, _G); + assertSimpleMatch(theme, "source", 1, NotSet, _NOT_SET, _G); + assertSimpleMatch(theme, "source.ts", 1, NotSet, _NOT_SET, _G); + assertSimpleMatch(theme, "source.tss", 1, NotSet, _NOT_SET, _G); // matches something - assertSimpleMatch(theme, "something", 1, FontStyle.NotSet, _NOT_SET, _G); - assertSimpleMatch(theme, "something.ts", 1, FontStyle.NotSet, _NOT_SET, _G); - assertSimpleMatch(theme, "something.tss", 1, FontStyle.NotSet, _NOT_SET, _G); + assertSimpleMatch(theme, "something", 1, NotSet, _NOT_SET, _G); + assertSimpleMatch(theme, "something.ts", 1, NotSet, _NOT_SET, _G); + assertSimpleMatch(theme, "something.tss", 1, NotSet, _NOT_SET, _G); // matches baz - assertSimpleMatch(theme, "baz", 1, FontStyle.NotSet, _NOT_SET, _C); - assertSimpleMatch(theme, "baz.ts", 1, FontStyle.NotSet, _NOT_SET, _C); - assertSimpleMatch(theme, "baz.tss", 1, FontStyle.NotSet, _NOT_SET, _C); + assertSimpleMatch(theme, "baz", 1, NotSet, _NOT_SET, _C); + assertSimpleMatch(theme, "baz.ts", 1, NotSet, _NOT_SET, _C); + assertSimpleMatch(theme, "baz.tss", 1, NotSet, _NOT_SET, _C); // matches constant - assertSimpleMatch(theme, "constant", 1, FontStyle.Italic, _D, _NOT_SET); - assertSimpleMatch(theme, "constant.string", 1, FontStyle.Italic, _D, _NOT_SET); - assertSimpleMatch(theme, "constant.hex", 1, FontStyle.Italic, _D, _NOT_SET); + assertSimpleMatch(theme, "constant", 1, Italic, _D, _NOT_SET); + assertSimpleMatch(theme, "constant.string", 1, Italic, _D, _NOT_SET); + assertSimpleMatch(theme, "constant.hex", 1, Italic, _D, _NOT_SET); // matches constant.numeric - assertSimpleMatch(theme, "constant.numeric", 2, FontStyle.Italic, _E, _NOT_SET); - assertSimpleMatch(theme, "constant.numeric.baz", 2, FontStyle.Italic, _E, _NOT_SET); + assertSimpleMatch(theme, "constant.numeric", 2, Italic, _E, _NOT_SET); + assertSimpleMatch(theme, "constant.numeric.baz", 2, Italic, _E, _NOT_SET); // matches constant.numeric.hex - assertSimpleMatch(theme, "constant.numeric.hex", 3, FontStyle.Bold, _E, _NOT_SET); - assertSimpleMatch(theme, "constant.numeric.hex.baz", 3, FontStyle.Bold, _E, _NOT_SET); + assertSimpleMatch(theme, "constant.numeric.hex", 3, Bold, _E, _NOT_SET); + assertSimpleMatch(theme, "constant.numeric.hex.baz", 3, Bold, _E, _NOT_SET); // matches constant.numeric.oct - assertSimpleMatch(theme, "constant.numeric.oct", 3, FontStyle.Bold | FontStyle.Italic | FontStyle.Underline, _E, - _NOT_SET); - assertSimpleMatch(theme, "constant.numeric.oct.baz", 3, FontStyle.Bold | FontStyle.Italic | FontStyle.Underline, - _E, _NOT_SET); + assertSimpleMatch(theme, "constant.numeric.oct", 3, Bold | Italic | Underline, _E, _NOT_SET); + assertSimpleMatch(theme, "constant.numeric.oct.baz", 3, Bold | Italic | Underline, _E, _NOT_SET); // matches constant.numeric.dec - assertSimpleMatch(theme, "constant.numeric.dec", 3, FontStyle.None, _F, _NOT_SET); - assertSimpleMatch(theme, "constant.numeric.dec.baz", 3, FontStyle.None, _F, _NOT_SET); + assertSimpleMatch(theme, "constant.numeric.dec", 3, None, _F, _NOT_SET); + assertSimpleMatch(theme, "constant.numeric.dec.baz", 3, None, _F, _NOT_SET); // matches storage.object.bar - assertSimpleMatch(theme, "storage.object.bar", 3, FontStyle.None, _H, _NOT_SET); - assertSimpleMatch(theme, "storage.object.bar.baz", 3, FontStyle.None, _H, _NOT_SET); + assertSimpleMatch(theme, "storage.object.bar", 3, None, _H, _NOT_SET); + assertSimpleMatch(theme, "storage.object.bar.baz", 3, None, _H, _NOT_SET); // does not match storage.object.bar - assertSimpleMatch(theme, "storage.object.bart", 0, FontStyle.NotSet, _NOT_SET, _NOT_SET); - assertSimpleMatch(theme, "storage.object", 0, FontStyle.NotSet, _NOT_SET, _NOT_SET); - assertSimpleMatch(theme, "storage", 0, FontStyle.NotSet, _NOT_SET, _NOT_SET); + assertSimpleMatch(theme, "storage.object.bart", 0, NotSet, _NOT_SET, _NOT_SET); + assertSimpleMatch(theme, "storage.object", 0, NotSet, _NOT_SET, _NOT_SET); + assertSimpleMatch(theme, "storage", 0, NotSet, _NOT_SET, _NOT_SET); assertMatch(theme, "bar", - new ThemeTrieElementRule[] { new ThemeTrieElementRule(1, Arrays.asList("selector", "source.css"), - FontStyle.Bold, _NOT_SET, _C), - new ThemeTrieElementRule(1, null, FontStyle.NotSet, _NOT_SET, _C) }); + new ThemeTrieElementRule(1, list("selector", "source.css"), Bold, _NOT_SET, _C), + new ThemeTrieElementRule(1, null, NotSet, _NOT_SET, _C)); } + /** + * test: theme matching Microsoft/vscode#23460 + */ @Test void testMicrosoft_vscode_23460() throws Exception { - final Theme theme = loadTheme("{" + - "\"settings\": ["+ - "{" + - "\"settings\": {"+ - "\"foreground\": \"#aec2e0\","+ - "\"background\": \"#14191f\""+ - "}"+ - "}, {"+ - "\"name\": \"JSON String\","+ - "\"scope\": \"meta.structure.dictionary.json string.quoted.double.json\","+ - "\"settings\": {"+ - "\"foreground\": \"#FF410D\""+ - "}"+ - "}, {"+ - "\"scope\": \"meta.structure.dictionary.json string.quoted.double.json\","+ - "\"settings\": {"+ - "\"foreground\": \"#ffffff\""+ - "}"+ - "},"+ - "{"+ - "\"scope\": \"meta.structure.dictionary.value.json string.quoted.double.json\","+ - "\"settings\": {"+ - "\"foreground\": \"#FF410D\""+ - "}"+ - "}"+ - "]"+ - "}"); + final Theme theme = createTheme(""" + {"settings": [ + { + "settings": { + "foreground": "#aec2e0", + "background": "#14191f" + } + }, { + "name": "JSON String", + "scope": "meta.structure.dictionary.json string.quoted.double.json", + "settings": { + "foreground": "#FF410D" + } + }, { + "scope": "meta.structure.dictionary.json string.quoted.double.json", + "settings": { + "foreground": "#ffffff" + } + }, { + "scope": "meta.structure.dictionary.value.json string.quoted.double.json", + "settings": { + "foreground": "#FF410D" + } + } + ]}"""); final ColorMap colorMap = new ColorMap(); final int _NOT_SET = 0; @@ -232,11 +222,10 @@ void testMicrosoft_vscode_23460() throws Exception { // meta.structure.dictionary.value.json // meta.structure.dictionary.json // source.json - assertMatch(theme, "string.quoted.double.json", new ThemeTrieElementRule[] { - new ThemeTrieElementRule(4, Arrays.asList("meta.structure.dictionary.value.json"), FontStyle.NotSet, _C, _NOT_SET), - new ThemeTrieElementRule(4, Arrays.asList("meta.structure.dictionary.json"), FontStyle.NotSet, _D, _NOT_SET), - new ThemeTrieElementRule(0, null, FontStyle.NotSet, _NOT_SET, _NOT_SET) - }); + assertMatch(theme, "string.quoted.double.json", + new ThemeTrieElementRule(4, list("meta.structure.dictionary.value.json"), NotSet, _C, _NOT_SET), + new ThemeTrieElementRule(4, list("meta.structure.dictionary.json"), NotSet, _D, _NOT_SET), + new ThemeTrieElementRule(0, null, NotSet, _NOT_SET, _NOT_SET)); final var parent3 = new ScopeListElement(null, "source.json", 0); final var parent2 = new ScopeListElement(parent3, "meta.structure.dictionary.json", 0); @@ -245,30 +234,24 @@ void testMicrosoft_vscode_23460() throws Exception { final int r = ScopeListElement.mergeMetadata( 0, parent1, - new ScopeMetadata("string.quoted.double.json", 0, 0, theme.match("string.quoted.double.json")) - ); + new ScopeMetadata("string.quoted.double.json", 0, 0, theme.match("string.quoted.double.json"))); final String color = theme.getColor(StackElementMetadata.getForeground(r)); assertEquals("#FF410D", color); } - private void assertMatch(final Theme theme, final String scopeName, final ThemeTrieElementRule[] expected) { - final List actual = theme.match(scopeName); + private void assertMatch(final Theme theme, final String scopeName, final ThemeTrieElementRule... expected) { + final var actual = theme.match(scopeName); assertArrayEquals(expected, actual.toArray(), "when matching <<" + scopeName + ">>"); } - private void assertSimpleMatch(final Theme theme, final String scopeName, final int scopeDepth, final int fontStyle, final int foreground, final int background) { - assertMatch(theme, scopeName, new ThemeTrieElementRule [] { - new ThemeTrieElementRule(scopeDepth, null, fontStyle, foreground, background) - }); + private void assertSimpleMatch(final Theme theme, final String scopeName, final int scopeDepth, final int fontStyle, + final int foreground, final int background) { + assertMatch(theme, scopeName, + new ThemeTrieElementRule(scopeDepth, null, fontStyle, foreground, background)); } private void assertNoMatch(final Theme theme, final String scopeName) { - assertMatch(theme, scopeName, new ThemeTrieElementRule [] { - new ThemeTrieElementRule(0, null, FontStyle.NotSet, 0, 0 /*_NOT_SET, _NOT_SET*/) - }); - } - - private Theme loadTheme(final String theme) throws Exception { - return Theme.createFromRawTheme(ThemeReader.readThemeSync("theme.json", new ByteArrayInputStream(theme.getBytes())), null); + assertMatch(theme, scopeName, + new ThemeTrieElementRule(0, null, NotSet, 0, 0 /*_NOT_SET, _NOT_SET*/)); } } diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeParsingTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeParsingTest.java index 240445ef6..8b11627c1 100644 --- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeParsingTest.java +++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeParsingTest.java @@ -11,61 +11,53 @@ */ package org.eclipse.tm4e.core.internal.theme; +import static org.eclipse.tm4e.core.internal.theme.FontStyle.*; import static org.junit.jupiter.api.Assertions.*; -import java.io.ByteArrayInputStream; -import java.util.Arrays; -import java.util.List; - -import org.eclipse.tm4e.core.internal.theme.reader.ThemeReader; import org.junit.jupiter.api.Test; /** - * * @see * github.com/Microsoft/vscode-textmate/blob/master/src/tests/themes.test.ts - * */ -public class ThemeParsingTest { +public class ThemeParsingTest extends AbstractThemeTest { + /** + * test: Theme parsing can parse + */ @Test public void testCanParse() throws Exception { final var actual = parseTheme(""" - { "settings": [ - { "settings": { "foreground": "#F8F8F2", "background": "#272822" } }, - { "scope": "source, something", "settings": { "background": "#100000" } }, - { "scope": ["bar", "baz"], "settings": { "background": "#010000" } }, - { "scope": "source.css selector bar", "settings": { "fontStyle": "bold" } }, - { "scope": "constant", "settings": { "fontStyle": "italic", "foreground": "#ff0000" } }, - { "scope": "constant.numeric", "settings": { "foreground": "#00ff00" } }, - { "scope": "constant.numeric.hex", "settings": { "fontStyle": "bold" } }, - { "scope": "constant.numeric.oct", "settings": { "fontStyle": "bold italic underline" } }, - { "scope": "constant.numeric.bin", "settings": { "fontStyle": "bold strikethrough" } }, - { "scope": "constant.numeric.dec", "settings": { "fontStyle": "", "foreground": "#0000ff" } }, - { "scope": "foo", "settings": { "fontStyle": "", "foreground": "#CFA" } } - ]}"""); + { "settings": [ + { "settings": { "foreground": "#F8F8F2", "background": "#272822" } }, + { "scope": "source, something", "settings": { "background": "#100000" } }, + { "scope": ["bar", "baz"], "settings": { "background": "#010000" } }, + { "scope": "source.css selector bar", "settings": { "fontStyle": "bold" } }, + { "scope": "constant", "settings": { "fontStyle": "italic", "foreground": "#ff0000" } }, + { "scope": "constant.numeric", "settings": { "foreground": "#00ff00" } }, + { "scope": "constant.numeric.hex", "settings": { "fontStyle": "bold" } }, + { "scope": "constant.numeric.oct", "settings": { "fontStyle": "bold italic underline" } }, + { "scope": "constant.numeric.bin", "settings": { "fontStyle": "bold strikethrough" } }, + { "scope": "constant.numeric.dec", "settings": { "fontStyle": "", "foreground": "#0000ff" } }, + { "scope": "foo", "settings": { "fontStyle": "", "foreground": "#CFA" } } + ]}"""); final var expected = new ParsedThemeRule[] { - new ParsedThemeRule("", null, 0, FontStyle.NotSet, "#F8F8F2", "#272822"), - new ParsedThemeRule("source", null, 1, FontStyle.NotSet, null, "#100000"), - new ParsedThemeRule("something", null, 1, FontStyle.NotSet, null, "#100000"), - new ParsedThemeRule("bar", null, 2, FontStyle.NotSet, null, "#010000"), - new ParsedThemeRule("baz", null, 2, FontStyle.NotSet, null, "#010000"), - new ParsedThemeRule("bar", Arrays.asList("selector", "source.css"), 3, FontStyle.Bold, null, null), - new ParsedThemeRule("constant", null, 4, FontStyle.Italic, "#ff0000", null), - new ParsedThemeRule("constant.numeric", null, 5, FontStyle.NotSet, "#00ff00", null), - new ParsedThemeRule("constant.numeric.hex", null, 6, FontStyle.Bold, null, null), - new ParsedThemeRule("constant.numeric.oct", null, 7, - FontStyle.Bold | FontStyle.Italic | FontStyle.Underline, null, null), - new ParsedThemeRule("constant.numeric.bin", null, 8, FontStyle.Bold | FontStyle.Strikethrough, null, - null), - new ParsedThemeRule("constant.numeric.dec", null, 9, FontStyle.None, "#0000ff", null), - new ParsedThemeRule("foo", null, 10, FontStyle.None, "#CFA", null), }; + new ParsedThemeRule("", null, 0, NotSet, "#F8F8F2", "#272822"), + new ParsedThemeRule("source", null, 1, NotSet, null, "#100000"), + new ParsedThemeRule("something", null, 1, NotSet, null, "#100000"), + new ParsedThemeRule("bar", null, 2, NotSet, null, "#010000"), + new ParsedThemeRule("baz", null, 2, NotSet, null, "#010000"), + new ParsedThemeRule("bar", list("selector", "source.css"), 3, Bold, null, null), + new ParsedThemeRule("constant", null, 4, Italic, "#ff0000", null), + new ParsedThemeRule("constant.numeric", null, 5, NotSet, "#00ff00", null), + new ParsedThemeRule("constant.numeric.hex", null, 6, Bold, null, null), + new ParsedThemeRule("constant.numeric.oct", null, 7, Bold | Italic | Underline, null, null), + new ParsedThemeRule("constant.numeric.bin", null, 8, Bold | Strikethrough, null, null), + new ParsedThemeRule("constant.numeric.dec", null, 9, None, "#0000ff", null), + new ParsedThemeRule("foo", null, 10, None, "#CFA", null), + }; assertArrayEquals(expected, actual.toArray()); } - - private List parseTheme(final String theme) throws Exception { - return Theme.parseTheme(ThemeReader.readThemeSync("theme.json", new ByteArrayInputStream(theme.getBytes()))); - } } diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeResolvingTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeResolvingTest.java index 5a508c9eb..7213f6e62 100644 --- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeResolvingTest.java +++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeResolvingTest.java @@ -11,15 +11,11 @@ */ package org.eclipse.tm4e.core.internal.theme; +import static org.eclipse.tm4e.core.internal.theme.FontStyle.*; import static org.junit.jupiter.api.Assertions.*; -import java.io.ByteArrayInputStream; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; import java.util.List; -import org.eclipse.tm4e.core.internal.theme.reader.ThemeReader; import org.eclipse.tm4e.core.internal.utils.CompareUtils; import org.junit.jupiter.api.Test; @@ -27,249 +23,286 @@ * @see * github.com/Microsoft/vscode-textmate/blob/master/src/tests/themes.test.ts */ -public class ThemeResolvingTest { +public class ThemeResolvingTest extends AbstractThemeTest { - private static final int NOT_SET = 0; - private static final ThemeTrieElementRule NOTSET_THEME_TRIE_ELEMENT_RULE = new ThemeTrieElementRule(0, null, - FontStyle.NotSet, NOT_SET, NOT_SET); + private static final ThemeTrieElementRule NOTSET_THEME_TRIE_ELEMENT_RULE = new ThemeTrieElementRule(0, null, NotSet, + _NOT_SET, _NOT_SET); private static final ThemeTrieElement NOTSET_THEME_TRIE_ELEMENT = new ThemeTrieElement( - NOTSET_THEME_TRIE_ELEMENT_RULE); + NOTSET_THEME_TRIE_ELEMENT_RULE); private static void assertStrArrCmp(final String testCase, final List a, final List b, - final int expected) { + final int expected) { assertEquals(expected, CompareUtils.strArrCmp(a, b), testCase); } - private static Theme createTheme(final ParsedThemeRule... rules) { - return Theme.createFromParsedTheme(List.of(rules), null); - } - - private static List parseTheme(final String theme) throws Exception { - return Theme.parseTheme(ThemeReader.readThemeSync("theme.json", new ByteArrayInputStream(theme.getBytes()))); - } - + /** + * test: Theme parsing can parse + */ @Test public void testThemeParsingCanParse() throws Exception { final var actual = parseTheme(""" - { "settings": [ - { "settings": { "foreground": "#F8F8F2", "background": "#272822" } }, - { "scope": "source, something", "settings": { "background": "#100000" } }, - { "scope": ["bar", "baz"], "settings": { "background": "#010000" } }, - { "scope": "source.css selector bar", "settings": { "fontStyle": "bold" } }, - { "scope": "constant", "settings": { "fontStyle": "italic", "foreground": "#ff0000" } }, - { "scope": "constant.numeric", "settings": { "foreground": "#00ff00" } }, - { "scope": "constant.numeric.hex", "settings": { "fontStyle": "bold" } }, - { "scope": "constant.numeric.oct", "settings": { "fontStyle": "bold italic underline" } }, - { "scope": "constant.numeric.bin", "settings": { "fontStyle": "bold strikethrough" } }, - { "scope": "constant.numeric.dec", "settings": { "fontStyle": "", "foreground": "#0000ff" } }, - { "scope": "foo", "settings": { "fontStyle": "", "foreground": "#CFA" } } - ]}"""); - - final var expected = List.of( - new ParsedThemeRule("", null, 0, FontStyle.NotSet, "#F8F8F2", "#272822"), - new ParsedThemeRule("source", null, 1, FontStyle.NotSet, null, "#100000"), - new ParsedThemeRule("something", null, 1, FontStyle.NotSet, null, "#100000"), - new ParsedThemeRule("bar", null, 2, FontStyle.NotSet, null, "#010000"), - new ParsedThemeRule("baz", null, 2, FontStyle.NotSet, null, "#010000"), - new ParsedThemeRule("bar", List.of("selector", "source.css"), 3, FontStyle.Bold, null, null), - new ParsedThemeRule("constant", null, 4, FontStyle.Italic, "#ff0000", null), - new ParsedThemeRule("constant.numeric", null, 5, FontStyle.NotSet, "#00ff00", null), - new ParsedThemeRule("constant.numeric.hex", null, 6, FontStyle.Bold, null, null), - new ParsedThemeRule("constant.numeric.oct", null, 7, - FontStyle.Bold | FontStyle.Italic | FontStyle.Underline, null, null), - new ParsedThemeRule("constant.numeric.bin", null, 8, FontStyle.Bold | FontStyle.Strikethrough, null, - null), - new ParsedThemeRule("constant.numeric.dec", null, 9, FontStyle.None, "#0000ff", null), - new ParsedThemeRule("foo", null, 10, FontStyle.None, "#CFA", null)); + { "settings": [ + { "settings": { "foreground": "#F8F8F2", "background": "#272822" } }, + { "scope": "source, something", "settings": { "background": "#100000" } }, + { "scope": ["bar", "baz"], "settings": { "background": "#010000" } }, + { "scope": "source.css selector bar", "settings": { "fontStyle": "bold" } }, + { "scope": "constant", "settings": { "fontStyle": "italic", "foreground": "#ff0000" } }, + { "scope": "constant.numeric", "settings": { "foreground": "#00ff00" } }, + { "scope": "constant.numeric.hex", "settings": { "fontStyle": "bold" } }, + { "scope": "constant.numeric.oct", "settings": { "fontStyle": "bold italic underline" } }, + { "scope": "constant.numeric.bin", "settings": { "fontStyle": "bold strikethrough" } }, + { "scope": "constant.numeric.dec", "settings": { "fontStyle": "", "foreground": "#0000ff" } }, + { "scope": "foo", "settings": { "fontStyle": "", "foreground": "#CFA" } } + ]}"""); + + final var expected = list( + new ParsedThemeRule("", null, 0, NotSet, "#F8F8F2", "#272822"), + new ParsedThemeRule("source", null, 1, NotSet, null, "#100000"), + new ParsedThemeRule("something", null, 1, NotSet, null, "#100000"), + new ParsedThemeRule("bar", null, 2, NotSet, null, "#010000"), + new ParsedThemeRule("baz", null, 2, NotSet, null, "#010000"), + new ParsedThemeRule("bar", list("selector", "source.css"), 3, Bold, null, null), + new ParsedThemeRule("constant", null, 4, Italic, "#ff0000", null), + new ParsedThemeRule("constant.numeric", null, 5, NotSet, "#00ff00", null), + new ParsedThemeRule("constant.numeric.hex", null, 6, Bold, null, null), + new ParsedThemeRule("constant.numeric.oct", null, 7, Bold | Italic | Underline, null, null), + new ParsedThemeRule("constant.numeric.bin", null, 8, Bold | Strikethrough, null, null), + new ParsedThemeRule("constant.numeric.dec", null, 9, None, "#0000ff", null), + new ParsedThemeRule("foo", null, 10, None, "#CFA", null)); assertArrayEquals(expected.toArray(), actual.toArray()); } + /** + * test: Theme resolving strcmp works + */ @Test public void testStrcmpWorks() { - final var actual = Arrays.asList("bar", "z", "zu", "a", "ab", ""); + final var actual = list("bar", "z", "zu", "a", "ab", ""); actual.sort(CompareUtils::strcmp); - final var expected = List.of("", "a", "ab", "bar", "z", "zu"); + final var expected = list("", "a", "ab", "bar", "z", "zu"); assertArrayEquals(expected.toArray(), actual.toArray()); } + /** + * test: Theme resolving strArrCmp works + */ @Test public void testStrArrCmpWorks() { assertStrArrCmp("001", null, null, 0); - assertStrArrCmp("002", null, Collections.emptyList(), -1); - assertStrArrCmp("003", null, List.of("a"), -1); - assertStrArrCmp("004", Collections.emptyList(), null, 1); - assertStrArrCmp("005", List.of("a"), null, 1); - assertStrArrCmp("006", Collections.emptyList(), Collections.emptyList(), 0); - assertStrArrCmp("007", Collections.emptyList(), List.of("a"), -1); - assertStrArrCmp("008", List.of("a"), Collections.emptyList(), 1); - assertStrArrCmp("009", List.of("a"), List.of("a"), 0); - assertStrArrCmp("010", List.of("a", "b"), List.of("a"), 1); - assertStrArrCmp("011", List.of("a"), List.of("a", "b"), -1); - assertStrArrCmp("012", List.of("a", "b"), List.of("a", "b"), 0); - assertStrArrCmp("013", List.of("a", "b"), List.of("a", "c"), -1); - assertStrArrCmp("014", List.of("a", "c"), List.of("a", "b"), 1); + assertStrArrCmp("002", null, list(), -1); + assertStrArrCmp("003", null, list("a"), -1); + assertStrArrCmp("004", list(), null, 1); + assertStrArrCmp("005", list("a"), null, 1); + assertStrArrCmp("006", list(), list(), 0); + assertStrArrCmp("007", list(), list("a"), -1); + assertStrArrCmp("008", list("a"), list(), 1); + assertStrArrCmp("009", list("a"), list("a"), 0); + assertStrArrCmp("010", list("a", "b"), list("a"), 1); + assertStrArrCmp("011", list("a"), list("a", "b"), -1); + assertStrArrCmp("012", list("a", "b"), list("a", "b"), 0); + assertStrArrCmp("013", list("a", "b"), list("a", "c"), -1); + assertStrArrCmp("014", list("a", "c"), list("a", "b"), 1); } + /** + * test: Theme resolving always has defaults + */ @Test public void testAlwaysHasDefaults() { final var actual = createTheme(); final var colorMap = new ColorMap(); final int _A = colorMap.getId("#000000"); final int _B = colorMap.getId("#ffffff"); - final var expected = new Theme(colorMap, - new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B), NOTSET_THEME_TRIE_ELEMENT); + final var expected = new Theme( + colorMap, + new ThemeTrieElementRule(0, null, None, _A, _B), + NOTSET_THEME_TRIE_ELEMENT); assertEquals(actual, expected); } + /** + * test: Theme resolving respects incoming defaults 1 + */ @Test public void testRespectsIncomingDefaults1() { - final var actual = createTheme(new ParsedThemeRule("", null, -1, FontStyle.NotSet, null, null)); + final var actual = createTheme(new ParsedThemeRule("", null, -1, NotSet, null, null)); final var colorMap = new ColorMap(); final int _A = colorMap.getId("#000000"); final int _B = colorMap.getId("#ffffff"); - final var expected = new Theme(colorMap, - new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B), NOTSET_THEME_TRIE_ELEMENT); + final var expected = new Theme( + colorMap, + new ThemeTrieElementRule(0, null, None, _A, _B), + NOTSET_THEME_TRIE_ELEMENT); assertEquals(actual, expected); } + /** + * test: Theme resolving respects incoming defaults 2 + */ @Test public void testRespectsIncomingDefaults2() { - final Theme actual = createTheme(new ParsedThemeRule("", null, -1, FontStyle.None, null, null)); + final Theme actual = createTheme(new ParsedThemeRule("", null, -1, None, null, null)); final var colorMap = new ColorMap(); final int _A = colorMap.getId("#000000"); final int _B = colorMap.getId("#ffffff"); - final var expected = new Theme(colorMap, - new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B), NOTSET_THEME_TRIE_ELEMENT); + final var expected = new Theme( + colorMap, + new ThemeTrieElementRule(0, null, None, _A, _B), + NOTSET_THEME_TRIE_ELEMENT); assertEquals(actual, expected); } + /** + * test: Theme resolving respects incoming defaults 3 + */ @Test public void testRespectsIncomingDefaults3() { - final var actual = createTheme(new ParsedThemeRule("", null, -1, FontStyle.Bold, null, null)); + final var actual = createTheme(new ParsedThemeRule("", null, -1, Bold, null, null)); final var colorMap = new ColorMap(); final int _A = colorMap.getId("#000000"); final int _B = colorMap.getId("#ffffff"); - final var expected = new Theme(colorMap, - new ThemeTrieElementRule(0, null, FontStyle.Bold, _A, _B), NOTSET_THEME_TRIE_ELEMENT); + final var expected = new Theme( + colorMap, + new ThemeTrieElementRule(0, null, Bold, _A, _B), + NOTSET_THEME_TRIE_ELEMENT); assertEquals(actual, expected); } + /** + * test: Theme resolving respects incoming defaults 4 + */ @Test public void testRespectsIncomingDefaults4() { - final var actual = createTheme(new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#ff0000", null)); + final var actual = createTheme(new ParsedThemeRule("", null, -1, NotSet, "#ff0000", null)); final var colorMap = new ColorMap(); final int _A = colorMap.getId("#ff0000"); final int _B = colorMap.getId("#ffffff"); - final var expected = new Theme(colorMap, new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B), - NOTSET_THEME_TRIE_ELEMENT); + final var expected = new Theme( + colorMap, + new ThemeTrieElementRule(0, null, None, _A, _B), + NOTSET_THEME_TRIE_ELEMENT); assertEquals(actual, expected); } + /** + * test: Theme resolving respects incoming defaults 5 + */ @Test public void testRespectsIncomingDefaults5() { - final var actual = createTheme( - new ParsedThemeRule("", null, -1, FontStyle.NotSet, null, "#ff0000"), - new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#00ff00", null), - new ParsedThemeRule("", null, -1, FontStyle.Bold, null, null)); + final var actual = createTheme(new ParsedThemeRule("", null, -1, NotSet, null, "#ff0000")); final var colorMap = new ColorMap(); - final int _A = colorMap.getId("#00ff00"); + final int _A = colorMap.getId("#000000"); final int _B = colorMap.getId("#ff0000"); - final var expected = new Theme(colorMap, new ThemeTrieElementRule(0, null, FontStyle.Bold, _A, _B), - NOTSET_THEME_TRIE_ELEMENT); + final var expected = new Theme( + colorMap, + new ThemeTrieElementRule(0, null, None, _A, _B), + NOTSET_THEME_TRIE_ELEMENT); assertEquals(actual, expected); } + /** + * test: Theme resolving can merge incoming defaults + */ @Test public void testCanMergeIncomingDefaults() { final var actual = createTheme( - new ParsedThemeRule("", null, -1, FontStyle.NotSet, null, "#ff0000"), - new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#00ff00", null), - new ParsedThemeRule("", null, -1, FontStyle.Bold, null, null)); + new ParsedThemeRule("", null, -1, NotSet, null, "#ff0000"), + new ParsedThemeRule("", null, -1, NotSet, "#00ff00", null), + new ParsedThemeRule("", null, -1, Bold, null, null)); final var colorMap = new ColorMap(); final int _A = colorMap.getId("#00ff00"); final int _B = colorMap.getId("#ff0000"); - final var expected = new Theme(colorMap, new ThemeTrieElementRule(0, null, FontStyle.Bold, _A, _B), - NOTSET_THEME_TRIE_ELEMENT); + final var expected = new Theme( + colorMap, + new ThemeTrieElementRule(0, null, Bold, _A, _B), + NOTSET_THEME_TRIE_ELEMENT); assertEquals(actual, expected); } + /** + * test: Theme resolving defaults are inherited + */ @Test public void testDefaultsAreInherited() { final Theme actual = createTheme( - new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#F8F8F2", "#272822"), - new ParsedThemeRule("var", null, -1, FontStyle.NotSet, "#ff0000", null)); + new ParsedThemeRule("", null, -1, NotSet, "#F8F8F2", "#272822"), + new ParsedThemeRule("var", null, -1, NotSet, "#ff0000", null)); final var colorMap = new ColorMap(); final int _A = colorMap.getId("#F8F8F2"); final int _B = colorMap.getId("#272822"); final int _C = colorMap.getId("#ff0000"); - - final var map = new HashMap(); - map.put("var", new ThemeTrieElement(new ThemeTrieElementRule(1, null, FontStyle.NotSet, _C, NOT_SET))); - - final var expected = new Theme(colorMap, - new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B), - new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, Collections.emptyList(), map)); + final var expected = new Theme( + colorMap, + new ThemeTrieElementRule(0, null, None, _A, _B), + new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, list(), map( + "var", new ThemeTrieElement(new ThemeTrieElementRule(1, null, NotSet, _C, _NOT_SET)) // + ))); assertEquals(actual, expected); } + /** + * test: Theme resolving same rules get merged + */ @Test public void testSameRulesGetMerged() { final var actual = createTheme( - new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#F8F8F2", "#272822"), - new ParsedThemeRule("var", null, 1, FontStyle.Bold, null, null), - new ParsedThemeRule("var", null, 0, FontStyle.NotSet, "#ff0000", null)); + new ParsedThemeRule("", null, -1, NotSet, "#F8F8F2", "#272822"), + new ParsedThemeRule("var", null, 1, Bold, null, null), + new ParsedThemeRule("var", null, 0, NotSet, "#ff0000", null)); final var colorMap = new ColorMap(); final int _A = colorMap.getId("#F8F8F2"); final int _B = colorMap.getId("#272822"); final int _C = colorMap.getId("#ff0000"); - - final var map = new HashMap(); - map.put("var", new ThemeTrieElement(new ThemeTrieElementRule(1, null, FontStyle.Bold, _C, NOT_SET))); - - final var expected = new Theme(colorMap, - new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B), - new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, Collections.emptyList(), map)); + final var expected = new Theme( + colorMap, + new ThemeTrieElementRule(0, null, None, _A, _B), + new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, list(), map( + "var", new ThemeTrieElement(new ThemeTrieElementRule(1, null, Bold, _C, _NOT_SET)) // + ))); assertEquals(actual, expected); } + /** + * test: Theme resolving rules are inherited 1 + */ @Test public void testRulesAreInherited1() { final var actual = createTheme( - new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#F8F8F2", "#272822"), - new ParsedThemeRule("var", null, -1, FontStyle.Bold, "#ff0000", null), - new ParsedThemeRule("var.identifier", null, -1, FontStyle.NotSet, "#00ff00", null)); + new ParsedThemeRule("", null, -1, NotSet, "#F8F8F2", "#272822"), + new ParsedThemeRule("var", null, -1, Bold, "#ff0000", null), + new ParsedThemeRule("var.identifier", null, -1, NotSet, "#00ff00", null)); final var colorMap = new ColorMap(); final int _A = colorMap.getId("#F8F8F2"); final int _B = colorMap.getId("#272822"); final int _C = colorMap.getId("#ff0000"); final int _D = colorMap.getId("#00ff00"); - - final var map1_1 = new HashMap(); - map1_1.put("identifier", new ThemeTrieElement(new ThemeTrieElementRule(2, null, FontStyle.Bold, _D, NOT_SET))); - final var map1 = new HashMap(); - map1.put("var", new ThemeTrieElement(new ThemeTrieElementRule(1, null, FontStyle.Bold, _C, NOT_SET), - Collections.emptyList(), map1_1)); - final var expected = new Theme(colorMap, - new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B), - new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, Collections.emptyList(), map1)); + new ThemeTrieElementRule(0, null, None, _A, _B), + new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, list(), map( + "var", new ThemeTrieElement(new ThemeTrieElementRule(1, null, Bold, _C, _NOT_SET), list(), map( + "identifier", new ThemeTrieElement(new ThemeTrieElementRule(2, null, Bold, _D, _NOT_SET)) // + )) // + ))); assertEquals(actual, expected); } + /** + * test: Theme resolving rules are inherited 2 + */ @Test public void testRulesAreInherited2() { final var actual = createTheme( - new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#F8F8F2", "#272822"), - new ParsedThemeRule("var", null, -1, FontStyle.Bold, "#ff0000", null), - new ParsedThemeRule("var.identifier", null, -1, FontStyle.NotSet, "#00ff00", null), - new ParsedThemeRule("constant", null, 4, FontStyle.Italic, "#100000", null), - new ParsedThemeRule("constant.numeric", null, 5, FontStyle.NotSet, "#200000", null), - new ParsedThemeRule("constant.numeric.hex", null, 6, FontStyle.Bold, null, null), - new ParsedThemeRule("constant.numeric.oct", null, 7, - FontStyle.Bold | FontStyle.Italic | FontStyle.Underline, null, null), - new ParsedThemeRule("constant.numeric.dec", null, 8, FontStyle.None, "#300000", null)); + new ParsedThemeRule("", null, -1, NotSet, "#F8F8F2", "#272822"), + new ParsedThemeRule("var", null, -1, Bold, "#ff0000", null), + new ParsedThemeRule("var.identifier", null, -1, NotSet, "#00ff00", null), + new ParsedThemeRule("constant", null, 4, Italic, "#100000", null), + new ParsedThemeRule("constant.numeric", null, 5, NotSet, "#200000", null), + new ParsedThemeRule("constant.numeric.hex", null, 6, Bold, null, null), + new ParsedThemeRule("constant.numeric.oct", null, 7, + Bold | Italic | Underline, null, null), + new ParsedThemeRule("constant.numeric.dec", null, 8, None, "#300000", null)); final var colorMap = new ColorMap(); final int _A = colorMap.getId("#F8F8F2"); final int _B = colorMap.getId("#272822"); @@ -279,156 +312,151 @@ public void testRulesAreInherited2() { final int _F = colorMap.getId("#ff0000"); final int _G = colorMap.getId("#00ff00"); - final var mapOfVar = new HashMap(); - mapOfVar.put("identifier", - new ThemeTrieElement(new ThemeTrieElementRule(2, null, FontStyle.Bold, _G, NOT_SET))); - - final var mapOfNumeric = new HashMap(); - mapOfNumeric.put("hex", new ThemeTrieElement(new ThemeTrieElementRule(3, null, FontStyle.Bold, _D, NOT_SET))); - mapOfNumeric.put("oct", new ThemeTrieElement(new ThemeTrieElementRule(3, null, - FontStyle.Bold | FontStyle.Italic | FontStyle.Underline, _D, NOT_SET))); - mapOfNumeric.put("dec", new ThemeTrieElement(new ThemeTrieElementRule(3, null, FontStyle.None, _E, NOT_SET))); - - final var mapOfConstant = new HashMap(); - mapOfConstant.put("numeric", new ThemeTrieElement(new ThemeTrieElementRule(2, null, - FontStyle.Italic, _D, NOT_SET), Collections.emptyList(), mapOfNumeric)); - - final var mapRoot = new HashMap(); - mapRoot.put("var", new ThemeTrieElement(new ThemeTrieElementRule(1, null, - FontStyle.Bold, _F, NOT_SET), Collections.emptyList(), mapOfVar)); - mapRoot.put("constant", new ThemeTrieElement(new ThemeTrieElementRule(1, null, - FontStyle.Italic, _C, NOT_SET), Collections.emptyList(), mapOfConstant)); - final var expected = new Theme(colorMap, - new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B), - new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, Collections.emptyList(), mapRoot)); + new ThemeTrieElementRule(0, null, None, _A, _B), + new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, list(), map( + "var", new ThemeTrieElement(new ThemeTrieElementRule(1, null, Bold, _F, _NOT_SET), list(), map( + "identifier", new ThemeTrieElement(new ThemeTrieElementRule(2, null, Bold, _G, _NOT_SET)) // + )), + "constant", new ThemeTrieElement(new ThemeTrieElementRule(1, null, Italic, _C, _NOT_SET), list(), map( + "numeric", + new ThemeTrieElement(new ThemeTrieElementRule(2, null, Italic, _D, _NOT_SET), list(), map( + "hex", new ThemeTrieElement(new ThemeTrieElementRule(3, null, Bold, _D, _NOT_SET)), + "oct", new ThemeTrieElement(new ThemeTrieElementRule(3, null, + Bold | Italic | Underline, _D, _NOT_SET)), + "dec", new ThemeTrieElement(new ThemeTrieElementRule(3, null, None, _E, _NOT_SET)) // + )))) // + ))); assertEquals(actual, expected); } + /** + * test: Theme resolving rules with parent scopes + */ @Test public void testRulesWithParentScopes() { final var actual = createTheme( - new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#F8F8F2", "#272822"), - new ParsedThemeRule("var", null, -1, FontStyle.Bold, "#100000", null), - new ParsedThemeRule("var.identifier", null, -1, FontStyle.NotSet, "#200000", null), - new ParsedThemeRule("var", List.of("source.css"), 1, FontStyle.Italic, "#300000", null), - new ParsedThemeRule("var", List.of("source.css"), 2, FontStyle.Underline, null, null)); + new ParsedThemeRule("", null, -1, NotSet, "#F8F8F2", "#272822"), + new ParsedThemeRule("var", null, -1, Bold, "#100000", null), + new ParsedThemeRule("var.identifier", null, -1, NotSet, "#200000", null), + new ParsedThemeRule("var", list("source.css"), 1, Italic, "#300000", null), + new ParsedThemeRule("var", list("source.css"), 2, Underline, null, null)); final var colorMap = new ColorMap(); final int _A = colorMap.getId("#F8F8F2"); final int _B = colorMap.getId("#272822"); final int _C = colorMap.getId("#100000"); final int _D = colorMap.getId("#300000"); final int _E = colorMap.getId("#200000"); - - final var mapOfVar = new HashMap(); - mapOfVar.put("identifier", - new ThemeTrieElement(new ThemeTrieElementRule(2, null, FontStyle.Bold, _E, NOT_SET), List.of( - new ThemeTrieElementRule(1, List.of("source.css"), FontStyle.Underline, _D, NOT_SET)))); - - final var mapRoot = new HashMap(); - mapRoot.put("var", - new ThemeTrieElement(new ThemeTrieElementRule(1, null, FontStyle.Bold, _C, NOT_SET), List.of( - new ThemeTrieElementRule(1, List.of("source.css"), FontStyle.Underline, _D, NOT_SET)), - mapOfVar)); - final var expected = new Theme(colorMap, - new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B), - new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, Collections.emptyList(), mapRoot)); + new ThemeTrieElementRule(0, null, None, _A, _B), + new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, list(), map( + "var", new ThemeTrieElement( + new ThemeTrieElementRule(1, null, Bold, _C, _NOT_SET), + list(new ThemeTrieElementRule(1, list("source.css"), Underline, _D, _NOT_SET)), map( + "identifier", new ThemeTrieElement( + new ThemeTrieElementRule(2, null, Bold, _E, _NOT_SET), + list(new ThemeTrieElementRule(1, list("source.css"), Underline, _D, _NOT_SET))) // + ) // + ) // + ))); assertEquals(actual, expected); } + /** + * test: Theme resolving issue #38: ignores rules with invalid colors + */ @Test public void testIssue_38_ignores_rules_with_invalid_colors() throws Exception { final var actual = parseTheme(""" - { "settings": [ - { - "settings": { - "background": "#222222", - "foreground": "#cccccc" - } - }, { - "name": "Variable", - "scope": "variable", - "settings": { - "fontStyle": "" - } - }, { - "name": "Function argument", - "scope": "variable.parameter", - "settings": { - "fontStyle": "italic", - "foreground": "" - } - }, { - "name": "Library variable", - "scope": "support.other.variable", - "settings": { - "fontStyle": "" - } - }, { - "name": "Function argument", - "scope": "variable.other", - "settings": { - "foreground": "", - "fontStyle": "normal" - } - }, { - "name": "Coffeescript Function argument", - "scope": "variable.parameter.function.coffee", - "settings": { - "foreground": "#F9D423", - "fontStyle": "italic" - } + { "settings": [ + { + "settings": { + "background": "#222222", + "foreground": "#cccccc" } - ]}"""); - - final var expected = List.of( - new ParsedThemeRule("", null, 0, FontStyle.NotSet, "#cccccc", "#222222"), - new ParsedThemeRule("variable", null, 1, FontStyle.None, null, null), - new ParsedThemeRule("variable.parameter", null, 2, FontStyle.Italic, null, null), - new ParsedThemeRule("support.other.variable", null, 3, FontStyle.None, null, null), - new ParsedThemeRule("variable.other", null, 4, FontStyle.None, null, null), - new ParsedThemeRule("variable.parameter.function.coffee", null, 5, FontStyle.Italic, "#F9D423", null)); - - assertArrayEquals(expected.toArray(), actual.toArray()); + }, { + "name": "Variable", + "scope": "variable", + "settings": { + "fontStyle": "" + } + }, { + "name": "Function argument", + "scope": "variable.parameter", + "settings": { + "fontStyle": "italic", + "foreground": "" + } + }, { + "name": "Library variable", + "scope": "support.other.variable", + "settings": { + "fontStyle": "" + } + }, { + "name": "Function argument", + "scope": "variable.other", + "settings": { + "foreground": "", + "fontStyle": "normal" + } + }, { + "name": "Coffeescript Function argument", + "scope": "variable.parameter.function.coffee", + "settings": { + "foreground": "#F9D423", + "fontStyle": "italic" + } + } + ]}"""); + + final var expected = new ParsedThemeRule[] { + new ParsedThemeRule("", null, 0, NotSet, "#cccccc", "#222222"), + new ParsedThemeRule("variable", null, 1, None, null, null), + new ParsedThemeRule("variable.parameter", null, 2, Italic, null, null), + new ParsedThemeRule("support.other.variable", null, 3, None, null, null), + new ParsedThemeRule("variable.other", null, 4, None, null, null), + new ParsedThemeRule("variable.parameter.function.coffee", null, 5, Italic, "#F9D423", null) + }; + assertArrayEquals(expected, actual.toArray()); } + /** + * test: Theme resolving issue #35: Trailing comma in a tmTheme scope selector + */ @Test public void testIssue_35_Trailing_comma_in_a_tmTheme_scope_selector() throws Exception { final var actual = parseTheme(""" - { "settings": [{ - "settings": { - "background": "#25292C", - "foreground": "#EFEFEF" - } - }, { - "name": "CSS at-rule keyword control", - "scope": " - meta.at-rule.return.scss,\n - meta.at-rule.return.scss punctuation.definition,\n - meta.at-rule.else.scss,\n - meta.at-rule.else.scss punctuation.definition,\n - meta.at-rule.if.scss,\n - meta.at-rule.if.scss punctuation.definition\n - ", - "settings": { - "foreground": "#CC7832" - } + { "settings": [{ + "settings": { + "background": "#25292C", + "foreground": "#EFEFEF" } - ]}"""); - - final var expected = List.of( - new ParsedThemeRule("", null, 0, FontStyle.NotSet, "#EFEFEF", "#25292C"), - new ParsedThemeRule("meta.at-rule.return.scss", null, 1, FontStyle.NotSet, "#CC7832", null), - new ParsedThemeRule("punctuation.definition", List.of("meta.at-rule.return.scss"), 1, - FontStyle.NotSet, "#CC7832", null), - new ParsedThemeRule("meta.at-rule.else.scss", null, 1, FontStyle.NotSet, "#CC7832", null), - new ParsedThemeRule("punctuation.definition", List.of("meta.at-rule.else.scss"), 1, - FontStyle.NotSet, "#CC7832", null), - new ParsedThemeRule("meta.at-rule.if.scss", null, 1, FontStyle.NotSet, "#CC7832", null), - new ParsedThemeRule("punctuation.definition", List.of("meta.at-rule.if.scss"), 1, - FontStyle.NotSet, "#CC7832", null)); - - assertArrayEquals(expected.toArray(), actual.toArray()); + }, { + "name": "CSS at-rule keyword control", + "scope": " + meta.at-rule.return.scss,\n + meta.at-rule.return.scss punctuation.definition,\n + meta.at-rule.else.scss,\n + meta.at-rule.else.scss punctuation.definition,\n + meta.at-rule.if.scss,\n + meta.at-rule.if.scss punctuation.definition\n + ", + "settings": { + "foreground": "#CC7832" + } + } + ]}"""); + + final var expected = new ParsedThemeRule[] { + new ParsedThemeRule("", null, 0, NotSet, "#EFEFEF", "#25292C"), + new ParsedThemeRule("meta.at-rule.return.scss", null, 1, NotSet, "#CC7832", null), + new ParsedThemeRule("punctuation.definition", list("meta.at-rule.return.scss"), 1, NotSet, "#CC7832", null), + new ParsedThemeRule("meta.at-rule.else.scss", null, 1, NotSet, "#CC7832", null), + new ParsedThemeRule("punctuation.definition", list("meta.at-rule.else.scss"), 1, NotSet, "#CC7832", null), + new ParsedThemeRule("meta.at-rule.if.scss", null, 1, NotSet, "#CC7832", null), + new ParsedThemeRule("punctuation.definition", list("meta.at-rule.if.scss"), 1, NotSet, "#CC7832", null) + }; + assertArrayEquals(expected, actual.toArray()); } } From 00f4ef7415791c185b91cebfd243d324c59d29ac Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 16 May 2022 16:16:00 +0200 Subject: [PATCH 07/41] add NullSafetyHelper#defaultIfNull --- .../tm4e/core/internal/rule/BeginEndRule.java | 4 +++- .../core/internal/rule/BeginWhileRule.java | 8 +++++--- .../tm4e/core/internal/rule/RuleFactory.java | 18 +++++++----------- .../core/internal/utils/NullSafetyHelper.java | 16 ++++++++++++++++ 4 files changed, 31 insertions(+), 15 deletions(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginEndRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginEndRule.java index 7ac19145b..bdf89e98e 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginEndRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginEndRule.java @@ -16,6 +16,8 @@ */ package org.eclipse.tm4e.core.internal.rule; +import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*; + import java.util.List; import org.eclipse.jdt.annotation.Nullable; @@ -49,7 +51,7 @@ public final class BeginEndRule extends Rule { super(id, name, contentName); this.begin = new RegExpSource(begin, this.id); this.beginCaptures = beginCaptures; - this.end = new RegExpSource(end == null ? "\uFFFF" : end, RuleId.END_RULE); + this.end = new RegExpSource(defaultIfNull(end, "\uFFFF"), RuleId.END_RULE); this.endHasBackReferences = this.end.hasBackReferences; this.endCaptures = endCaptures; this.applyEndPatternLast = applyEndPatternLast; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginWhileRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginWhileRule.java index 1b51c8aa5..acf4935c9 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginWhileRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginWhileRule.java @@ -16,6 +16,8 @@ */ package org.eclipse.tm4e.core.internal.rule; +import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*; + import java.util.List; import org.eclipse.jdt.annotation.Nullable; @@ -109,11 +111,11 @@ private RegExpSourceList getCachedCompiledWhilePatterns(@Nullable final String e if (cachedCompiledWhilePatterns == null) { cachedCompiledWhilePatterns = new RegExpSourceList(); cachedCompiledWhilePatterns.add(this.whileHasBackReferences ? this._while.clone() : this._while); - if (whileHasBackReferences) { - cachedCompiledWhilePatterns.setSource(0, endRegexSource != null ? endRegexSource : "\uFFFF"); - } this.cachedCompiledWhilePatterns = cachedCompiledWhilePatterns; } + if (whileHasBackReferences) { + cachedCompiledWhilePatterns.setSource(0, defaultIfNull(endRegexSource, "\uFFFF")); + } return cachedCompiledWhilePatterns; } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java index 7508c4dcc..318b81389 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java @@ -86,12 +86,10 @@ public static RuleId getCompiledRuleId(final IRawRule desc, final IRuleFactoryHe ruleId, desc.getName(), desc.getContentName(), - begin, compileCaptures( - desc.getBeginCaptures() != null ? desc.getBeginCaptures() : desc.getCaptures(), - helper, repository), - ruleWhile, compileCaptures( - desc.getWhileCaptures() != null ? desc.getWhileCaptures() : desc.getCaptures(), - helper, repository), + begin, compileCaptures(defaultIfNull(desc.getBeginCaptures(), desc.getCaptures()), helper, + repository), + ruleWhile, compileCaptures(defaultIfNull(desc.getWhileCaptures(), desc.getCaptures()), + helper, repository), compilePatterns(desc.getPatterns(), helper, repository)); } @@ -100,12 +98,10 @@ ruleWhile, compileCaptures( ruleId, desc.getName(), desc.getContentName(), - begin, compileCaptures( - desc.getBeginCaptures() != null ? desc.getBeginCaptures() : desc.getCaptures(), - helper, repository), - desc.getEnd(), compileCaptures( - desc.getEndCaptures() != null ? desc.getEndCaptures() : desc.getCaptures(), helper, + begin, compileCaptures(defaultIfNull(desc.getBeginCaptures(), desc.getCaptures()), helper, repository), + desc.getEnd(), compileCaptures(defaultIfNull(desc.getEndCaptures(), desc.getCaptures()), + helper, repository), desc.isApplyEndPatternLast(), compilePatterns(desc.getPatterns(), helper, repository)); }); diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/NullSafetyHelper.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/NullSafetyHelper.java index 200a7dbda..028ae55db 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/NullSafetyHelper.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/NullSafetyHelper.java @@ -12,6 +12,8 @@ */ package org.eclipse.tm4e.core.internal.utils; +import java.util.function.Supplier; + import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; @@ -32,6 +34,20 @@ public static T castNonNull(@Nullable final T value) { return value; } + public static T defaultIfNull(@Nullable final T object, final T defaultValue) { + if (object == null) { + return defaultValue; + } + return object; + } + + public static T defaultIfNull(@Nullable final T object, final Supplier defaultValue) { + if (object == null) { + return defaultValue.get(); + } + return object; + } + private NullSafetyHelper() { } } From e66cd501e99a0209474bb583be2b0d82739b0c54 Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 16 May 2022 16:30:42 +0200 Subject: [PATCH 08/41] Rename some variables in oniguruma package This is done to stay closer to upstream project. --- .../core/internal/grammar/LineTokenizer.java | 23 +++++++++---------- .../core/internal/oniguruma/OnigScanner.java | 9 ++++---- .../core/internal/oniguruma/OnigSearcher.java | 4 ++-- .../core/internal/oniguruma/OnigString.java | 12 +++++----- .../internal/oniguruma/OnigStringTest.java | 2 +- 5 files changed, 24 insertions(+), 26 deletions(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java index 290062932..12c1b39e5 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java @@ -122,7 +122,7 @@ private StackElement scan(final boolean checkWhileConditions) { } private void scanNext() { - LOGGER.log(TRACE, () -> "@@scanNext: |" + lineText.string.replace("\n", "\\n").substring(linePos) + '|'); + LOGGER.log(TRACE, () -> "@@scanNext: |" + lineText.content.replace("\n", "\\n").substring(linePos) + '|'); final IMatchResult r = matchRuleOrInjections(grammar, lineText, isFirstLine, linePos, stack, anchorPosition); @@ -180,7 +180,7 @@ private void scanNext() { final StackElement beforePush = stack; // push it on the stack rule - final String scopeName = rule.getName(lineText.string, captureIndices); + final String scopeName = rule.getName(lineText.content, captureIndices); final ScopeListElement nameScopesList = stack.contentNameScopesList.push(grammar, scopeName); stack = stack.push(matchedRuleId, linePos, anchorPosition, captureIndices[0].end == lineText.bytesCount, null, nameScopesList, nameScopesList); @@ -196,13 +196,13 @@ private void scanNext() { lineTokens.produce(stack, captureIndices[0].end); anchorPosition = captureIndices[0].end; - final String contentName = pushedRule.getContentName(lineText.string, captureIndices); + final String contentName = pushedRule.getContentName(lineText.content, captureIndices); final ScopeListElement contentNameScopesList = nameScopesList.push(grammar, contentName); stack = stack.setContentNameScopesList(contentNameScopesList); if (pushedRule.endHasBackReferences) { stack = stack.setEndRule( - pushedRule.getEndWithResolvedBackReferences(lineText.string, captureIndices)); + pushedRule.getEndWithResolvedBackReferences(lineText.content, captureIndices)); } if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) { @@ -224,13 +224,13 @@ private void scanNext() { lineTokens.produce(stack, captureIndices[0].end); anchorPosition = captureIndices[0].end; - final String contentName = pushedRule.getContentName(lineText.string, captureIndices); + final String contentName = pushedRule.getContentName(lineText.content, captureIndices); final ScopeListElement contentNameScopesList = nameScopesList.push(grammar, contentName); stack = stack.setContentNameScopesList(contentNameScopesList); if (pushedRule.whileHasBackReferences) { stack = stack.setEndRule( - pushedRule.getWhileWithResolvedBackReferences(lineText.string, captureIndices)); + pushedRule.getWhileWithResolvedBackReferences(lineText.content, captureIndices)); } if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) { @@ -416,8 +416,7 @@ public boolean isPriorityMatch() { } private void handleCaptures(final Grammar grammar, final OnigString lineText, final boolean isFirstLine, - final StackElement stack, - final LineTokens lineTokens, final List<@Nullable CaptureRule> captures, + final StackElement stack, final LineTokens lineTokens, final List<@Nullable CaptureRule> captures, final OnigCaptureIndex[] captureIndices) { if (captures.isEmpty()) { return; @@ -463,22 +462,22 @@ private void handleCaptures(final Grammar grammar, final OnigString lineText, fi final var retokenizeCapturedWithRuleId = captureRule.retokenizeCapturedWithRuleId; if (retokenizeCapturedWithRuleId.notEquals(RuleId.NO_RULE)) { // the capture requires additional matching - final String scopeName = captureRule.getName(lineText.string, captureIndices); + final String scopeName = captureRule.getName(lineText.content, captureIndices); final ScopeListElement nameScopesList = stack.contentNameScopesList.push(grammar, scopeName); - final String contentName = captureRule.getContentName(lineText.string, captureIndices); + final String contentName = captureRule.getContentName(lineText.content, captureIndices); final ScopeListElement contentNameScopesList = nameScopesList.push(grammar, contentName); // the capture requires additional matching final StackElement stackClone = stack.push(retokenizeCapturedWithRuleId, captureIndex.start, -1, false, null, nameScopesList, contentNameScopesList); - final var onigSubStr = OnigString.of(lineText.string.substring(0, captureIndex.end)); + final var onigSubStr = OnigString.of(lineText.content.substring(0, captureIndex.end)); tokenizeString(grammar, onigSubStr, isFirstLine && captureIndex.start == 0, captureIndex.start, stackClone, lineTokens, false); continue; } // push - final String captureRuleScopeName = captureRule.getName(lineText.string, captureIndices); + final String captureRuleScopeName = captureRule.getName(lineText.content, captureIndices); if (captureRuleScopeName != null) { // push final ScopeListElement base = localStack.isEmpty() diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigScanner.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigScanner.java index 4209e880e..cc280c48f 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigScanner.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigScanner.java @@ -29,8 +29,8 @@ public OnigScanner(final Collection regexps) { } @Nullable - public OnigNextMatchResult findNextMatchSync(final OnigString source, final int charOffset) { - final OnigResult bestResult = searcher.search(source, charOffset); + public OnigNextMatchResult findNextMatchSync(final OnigString source, final int startPosition) { + final OnigResult bestResult = searcher.search(source, startPosition); if (bestResult != null) { return new OnigNextMatchResult(bestResult, source); } @@ -38,8 +38,7 @@ public OnigNextMatchResult findNextMatchSync(final OnigString source, final int } @Nullable - OnigNextMatchResult findNextMatchSync(final String lin, final int pos) { - return findNextMatchSync(OnigString.of(lin), pos); + public OnigNextMatchResult findNextMatchSync(final String text, final int startPosition) { + return findNextMatchSync(OnigString.of(text), startPosition); } - } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigSearcher.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigSearcher.java index d7309e6d0..8936a0dfe 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigSearcher.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigSearcher.java @@ -31,8 +31,8 @@ final class OnigSearcher { } @Nullable - OnigResult search(final OnigString source, final int charOffset) { - final int byteOffset = source.getByteIndexOfChar(charOffset); + OnigResult search(final OnigString source, final int startPosition) { + final int byteOffset = source.getByteIndexOfChar(startPosition); int bestLocation = 0; OnigResult bestResult = null; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigString.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigString.java index 363e158c3..4dc11bf2d 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigString.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigString.java @@ -155,21 +155,21 @@ public static OnigString of(final String str) { return new MultiByteString(str, bytesUtf8); } - public final String string; + public final String content; public final int bytesCount; final byte[] bytesUTF8; - private OnigString(final String str, final byte[] bytesUTF8) { - string = str; + private OnigString(final String content, final byte[] bytesUTF8) { + this.content = content; this.bytesUTF8 = bytesUTF8; bytesCount = bytesUTF8.length; } protected final String throwOutOfBoundsException(final String indexName, final int index, final int minIndex, - final int maxIndex) { + final int maxIndex) { throw new ArrayIndexOutOfBoundsException( - indexName + " index " + index + " is out of range " + minIndex + ".." + maxIndex + " of " + this); + indexName + " index " + index + " is out of range " + minIndex + ".." + maxIndex + " of " + this); } abstract int getByteIndexOfChar(int charIndex); @@ -178,6 +178,6 @@ protected final String throwOutOfBoundsException(final String indexName, final i @Override public String toString() { - return getClass().getSimpleName() + "[string=\"" + string + "\"]"; + return getClass().getSimpleName() + "[string=\"" + content + "\"]"; } } diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/oniguruma/OnigStringTest.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/oniguruma/OnigStringTest.java index 27131f74e..911d04d7f 100644 --- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/oniguruma/OnigStringTest.java +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/oniguruma/OnigStringTest.java @@ -9,7 +9,7 @@ class OnigStringTest { private OnigString verifyBasics(final String string, final Class expectedType) { final OnigString onigString = OnigString.of(string); assertInstanceOf(expectedType, onigString); - assertEquals(string, onigString.string); + assertEquals(string, onigString.content); assertTrue(onigString.toString().contains(string)); assertEquals(onigString.bytesCount, onigString.bytesUTF8.length); From c705814a7a14baab5438495e295e6afbdfb0729a Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 16 May 2022 16:40:36 +0200 Subject: [PATCH 09/41] Change `Set getColorMap()` to `List getColorMap()` --- .../core/internal/registry/SyncRegistry.java | 3 +-- .../tm4e/core/internal/theme/ColorMap.java | 5 ++-- .../tm4e/core/internal/theme/Theme.java | 26 ++++++++++--------- .../eclipse/tm4e/core/registry/Registry.java | 4 +-- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java index 13588b4aa..8f2305c5b 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java @@ -23,7 +23,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Set; import org.eclipse.jdt.annotation.Nullable; import org.eclipse.tm4e.core.grammar.IGrammar; @@ -59,7 +58,7 @@ public void setTheme(final Theme theme) { this.grammars.values().forEach(Grammar::onDidChangeTheme); } - public Set getColorMap() { + public List getColorMap() { return this.theme.getColorMap(); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ColorMap.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ColorMap.java index a0ac295c7..3576d1f8b 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ColorMap.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ColorMap.java @@ -18,7 +18,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import java.util.Set; import org.eclipse.jdt.annotation.Nullable; import org.eclipse.tm4e.core.TMException; @@ -78,8 +77,8 @@ public String getColor(final int id) { return null; } - public Set getColorMap() { - return color2id.keySet(); + public List getColorMap() { + return new ArrayList<>(color2id.keySet()); } @Override diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java index 24c77feb0..ff4a55d41 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java @@ -20,7 +20,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import java.util.Set; import java.util.regex.Pattern; import org.eclipse.jdt.annotation.Nullable; @@ -50,7 +49,8 @@ public static Theme createFromRawTheme(@Nullable final IRawTheme source, @Nullab return createFromParsedTheme(parseTheme(source), colorMap); } - public static Theme createFromParsedTheme(final List source, @Nullable final List colorMap) { + public static Theme createFromParsedTheme(final List source, + @Nullable final List colorMap) { return resolveParsedThemeRules(source, colorMap); } @@ -65,7 +65,7 @@ public Theme(final ColorMap colorMap, final ThemeTrieElementRule defaults, final this.defaults = defaults; } - public Set getColorMap() { + public List getColorMap() { return this.colorMap.getColorMap(); } @@ -147,13 +147,15 @@ public static List parseTheme(@Nullable final IRawTheme source) String foreground = null; final Object settingsForeground = entrySetting.getForeground(); - if (settingsForeground instanceof final String stringSettingsForeground && isValidHexColor(stringSettingsForeground)) { + if (settingsForeground instanceof final String stringSettingsForeground + && isValidHexColor(stringSettingsForeground)) { foreground = stringSettingsForeground; } String background = null; final Object settingsBackground = entrySetting.getBackground(); - if (settingsBackground instanceof final String stringSettingsBackground && isValidHexColor(stringSettingsBackground)) { + if (settingsBackground instanceof final String stringSettingsBackground + && isValidHexColor(stringSettingsBackground)) { background = stringSettingsBackground; } @@ -180,7 +182,7 @@ public static List parseTheme(@Nullable final IRawTheme source) * Resolve rules (i.e. inheritance). */ public static Theme resolveParsedThemeRules(final List _parsedThemeRules, - @Nullable final List _colorMap) { + @Nullable final List _colorMap) { // copy the list since we cannot be sure the given list is mutable final var parsedThemeRules = new ArrayList<>(_parsedThemeRules); @@ -216,13 +218,13 @@ public static Theme resolveParsedThemeRules(final List _parsedT } final var colorMap = new ColorMap(_colorMap); final var defaults = new ThemeTrieElementRule(0, null, defaultFontStyle, colorMap.getId(defaultForeground), - colorMap.getId(defaultBackground)); + colorMap.getId(defaultBackground)); final var root = new ThemeTrieElement(new ThemeTrieElementRule(0, null, FontStyle.NotSet, 0, 0), - Collections.emptyList()); + Collections.emptyList()); for (final var rule : parsedThemeRules) { root.insert(0, rule.scope, rule.parentScopes, rule.fontStyle, colorMap.getId(rule.foreground), - colorMap.getId(rule.background)); + colorMap.getId(rule.background)); } return new Theme(colorMap, defaults, root); @@ -282,8 +284,8 @@ public boolean equals(@Nullable final Object obj) { } final Theme other = (Theme) obj; return Objects.equals(cache, other.cache) - && Objects.equals(colorMap, other.colorMap) - && Objects.equals(defaults, other.defaults) - && Objects.equals(root, other.root); + && Objects.equals(colorMap, other.colorMap) + && Objects.equals(defaults, other.defaults) + && Objects.equals(root, other.root); } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/Registry.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/Registry.java index 8c7c331b5..f6bd7ff09 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/Registry.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/Registry.java @@ -20,8 +20,8 @@ import java.io.FileInputStream; import java.io.InputStream; import java.util.ArrayList; +import java.util.List; import java.util.Map; -import java.util.Set; import org.eclipse.jdt.annotation.Nullable; import org.eclipse.tm4e.core.TMException; @@ -66,7 +66,7 @@ public void setTheme(final IRawTheme theme) { /** * Returns a lookup array for color ids. */ - public Set getColorMap() { + public List getColorMap() { return this.syncRegistry.getColorMap(); } From 3ab8ff9ed766196c7dd3beb5a2317d1d48413ab4 Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 16 May 2022 16:44:30 +0200 Subject: [PATCH 10/41] Refactor LineTokenizer --- .../core/internal/grammar/LineTokenizer.java | 127 +++++++++--------- 1 file changed, 63 insertions(+), 64 deletions(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java index 12c1b39e5..84cfa52e7 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java @@ -56,17 +56,6 @@ private interface IMatchInjectionsResult extends IMatchResult { boolean isPriorityMatch(); } - private static final class WhileStack { - - private final StackElement stack; - private final BeginWhileRule rule; - - private WhileStack(final StackElement stack, final BeginWhileRule rule) { - this.stack = stack; - this.rule = rule; - } - } - private static final class WhileCheckResult { private final StackElement stack; @@ -75,7 +64,7 @@ private static final class WhileCheckResult { private final boolean isFirstLine; private WhileCheckResult(final StackElement stack, final int linePos, final int anchorPosition, - final boolean isFirstLine) { + final boolean isFirstLine) { this.stack = stack; this.linePos = linePos; this.anchorPosition = anchorPosition; @@ -93,7 +82,7 @@ private WhileCheckResult(final StackElement stack, final int linePos, final int private boolean stop; private LineTokenizer(final Grammar grammar, final OnigString lineText, final boolean isFirstLine, - final int linePos, final StackElement stack, final LineTokens lineTokens) { + final int linePos, final StackElement stack, final LineTokens lineTokens) { this.grammar = grammar; this.lineText = lineText; this.isFirstLine = isFirstLine; @@ -107,7 +96,7 @@ private StackElement scan(final boolean checkWhileConditions) { if (checkWhileConditions) { final var whileCheckResult = checkWhileConditions(grammar, lineText, isFirstLine, linePos, stack, - lineTokens); + lineTokens); stack = whileCheckResult.stack; linePos = whileCheckResult.linePos; isFirstLine = whileCheckResult.isFirstLine; @@ -162,7 +151,7 @@ private void scanNext() { if (!hasAdvanced && popped.getEnterPos() == linePos) { // Grammar pushed & popped a rule without advancing LOGGER.log(INFO, - "[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"); + "[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"); // See https://github.com/Microsoft/vscode-textmate/issues/12 // Let's assume this was a mistake by the grammar author and the // intent was to continue in this state @@ -183,7 +172,7 @@ private void scanNext() { final String scopeName = rule.getName(lineText.content, captureIndices); final ScopeListElement nameScopesList = stack.contentNameScopesList.push(grammar, scopeName); stack = stack.push(matchedRuleId, linePos, anchorPosition, - captureIndices[0].end == lineText.bytesCount, null, nameScopesList, nameScopesList); + captureIndices[0].end == lineText.bytesCount, null, nameScopesList, nameScopesList); if (rule instanceof final BeginEndRule pushedRule) { // if (IN_DEBUG_MODE) { @@ -192,7 +181,7 @@ private void scanNext() { // } handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, pushedRule.beginCaptures, - captureIndices); + captureIndices); lineTokens.produce(stack, captureIndices[0].end); anchorPosition = captureIndices[0].end; @@ -202,13 +191,13 @@ private void scanNext() { if (pushedRule.endHasBackReferences) { stack = stack.setEndRule( - pushedRule.getEndWithResolvedBackReferences(lineText.content, captureIndices)); + pushedRule.getEndWithResolvedBackReferences(lineText.content, captureIndices)); } if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) { // Grammar pushed the same rule without advancing LOGGER.log(INFO, - "[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"); + "[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"); stack = castNonNull(stack.pop()); lineTokens.produce(stack, lineText.bytesCount); stop = true; @@ -220,7 +209,7 @@ private void scanNext() { // } handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, pushedRule.beginCaptures, - captureIndices); + captureIndices); lineTokens.produce(stack, captureIndices[0].end); anchorPosition = captureIndices[0].end; @@ -230,13 +219,13 @@ private void scanNext() { if (pushedRule.whileHasBackReferences) { stack = stack.setEndRule( - pushedRule.getWhileWithResolvedBackReferences(lineText.content, captureIndices)); + pushedRule.getWhileWithResolvedBackReferences(lineText.content, captureIndices)); } if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) { // Grammar pushed the same rule without advancing LOGGER.log(INFO, - "[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"); + "[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"); stack = castNonNull(stack.pop()); lineTokens.produce(stack, lineText.bytesCount); stop = true; @@ -250,7 +239,7 @@ private void scanNext() { // } handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, matchingRule.captures, - captureIndices); + captureIndices); lineTokens.produce(stack, captureIndices[0].end); // pop rule immediately since it is a MatchRule @@ -259,7 +248,7 @@ private void scanNext() { if (!hasAdvanced) { // Grammar is not advancing, nor is it pushing/popping LOGGER.log(INFO, - "[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"); + "[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"); stack = stack.safePop(); lineTokens.produce(stack, lineText.bytesCount); stop = true; @@ -277,7 +266,7 @@ private void scanNext() { @Nullable private IMatchResult matchRule(final Grammar grammar, final OnigString lineText, final boolean isFirstLine, - final int linePos, final StackElement stack, final int anchorPosition) { + final int linePos, final StackElement stack, final int anchorPosition) { final Rule rule = stack.getRule(grammar); final CompiledRule ruleScanner = rule.compileAG(grammar, stack.endRule, isFirstLine, linePos == anchorPosition); @@ -302,8 +291,8 @@ public OnigCaptureIndex[] getCaptureIndices() { @Nullable private IMatchResult matchRuleOrInjections(final Grammar grammar, final OnigString lineText, - final boolean isFirstLine, - final int linePos, final StackElement stack, final int anchorPosition) { + final boolean isFirstLine, + final int linePos, final StackElement stack, final int anchorPosition) { // Look for normal grammar rule final IMatchResult matchResult = matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition); @@ -315,8 +304,8 @@ private IMatchResult matchRuleOrInjections(final Grammar grammar, final OnigStri } final IMatchInjectionsResult injectionResult = matchInjections(injections, grammar, lineText, isFirstLine, - linePos, - stack, anchorPosition); + linePos, + stack, anchorPosition); if (injectionResult == null) { // No injections matched => early return return matchResult; @@ -332,7 +321,7 @@ private IMatchResult matchRuleOrInjections(final Grammar grammar, final OnigStri final int injectionResultScore = injectionResult.getCaptureIndices()[0].start; if (injectionResultScore < matchResultScore - || injectionResult.isPriorityMatch() && injectionResultScore == matchResultScore) { + || injectionResult.isPriorityMatch() && injectionResultScore == matchResultScore) { // injection won! return injectionResult; } @@ -342,8 +331,8 @@ private IMatchResult matchRuleOrInjections(final Grammar grammar, final OnigStri @Nullable private IMatchInjectionsResult matchInjections(final List injections, final Grammar grammar, - final OnigString lineText, - final boolean isFirstLine, final int linePos, final StackElement stack, final int anchorPosition) { + final OnigString lineText, + final boolean isFirstLine, final int linePos, final StackElement stack, final int anchorPosition) { // The lower the better int bestMatchRating = Integer.MAX_VALUE; OnigCaptureIndex[] bestMatchCaptureIndices = null; @@ -359,7 +348,7 @@ private IMatchInjectionsResult matchInjections(final List injections, } final CompiledRule ruleScanner = grammar.getRule(injection.ruleId).compileAG(grammar, null, isFirstLine, - linePos == anchorPosition); + linePos == anchorPosition); final OnigNextMatchResult matchResult = ruleScanner.scanner.findNextMatchSync(lineText, linePos); if (matchResult == null) { @@ -416,25 +405,26 @@ public boolean isPriorityMatch() { } private void handleCaptures(final Grammar grammar, final OnigString lineText, final boolean isFirstLine, - final StackElement stack, final LineTokens lineTokens, final List<@Nullable CaptureRule> captures, - final OnigCaptureIndex[] captureIndices) { + final StackElement stack, final LineTokens lineTokens, final List<@Nullable CaptureRule> captures, + final OnigCaptureIndex[] captureIndices) { if (captures.isEmpty()) { return; } + final var lineTextContent = lineText.content; + final int len = Math.min(captures.size(), captureIndices.length); final var localStack = new ArrayDeque(); final int maxEnd = captureIndices[0].end; - OnigCaptureIndex captureIndex; for (int i = 0; i < len; i++) { - final CaptureRule captureRule = captures.get(i); + final var captureRule = captures.get(i); if (captureRule == null) { // Not interested continue; } - captureIndex = captureIndices[i]; + final var captureIndex = captureIndices[i]; if (captureIndex.getLength() == 0) { // Nothing really captured @@ -462,28 +452,25 @@ private void handleCaptures(final Grammar grammar, final OnigString lineText, fi final var retokenizeCapturedWithRuleId = captureRule.retokenizeCapturedWithRuleId; if (retokenizeCapturedWithRuleId.notEquals(RuleId.NO_RULE)) { // the capture requires additional matching - final String scopeName = captureRule.getName(lineText.content, captureIndices); - final ScopeListElement nameScopesList = stack.contentNameScopesList.push(grammar, scopeName); - final String contentName = captureRule.getContentName(lineText.content, captureIndices); - final ScopeListElement contentNameScopesList = nameScopesList.push(grammar, contentName); + final var scopeName = captureRule.getName(lineTextContent, captureIndices); + final var nameScopesList = stack.contentNameScopesList.push(grammar, scopeName); + final var contentName = captureRule.getContentName(lineTextContent, captureIndices); + final var contentNameScopesList = nameScopesList.push(grammar, contentName); // the capture requires additional matching - final StackElement stackClone = stack.push(retokenizeCapturedWithRuleId, captureIndex.start, -1, false, - null, nameScopesList, contentNameScopesList); - final var onigSubStr = OnigString.of(lineText.content.substring(0, captureIndex.end)); + final var stackClone = stack.push(retokenizeCapturedWithRuleId, captureIndex.start, -1, false, null, + nameScopesList, contentNameScopesList); + final var onigSubStr = OnigString.of(lineTextContent.substring(0, captureIndex.end)); tokenizeString(grammar, onigSubStr, isFirstLine && captureIndex.start == 0, - captureIndex.start, stackClone, lineTokens, false); + captureIndex.start, stackClone, lineTokens, false); continue; } - // push - final String captureRuleScopeName = captureRule.getName(lineText.content, captureIndices); + final var captureRuleScopeName = captureRule.getName(lineTextContent, captureIndices); if (captureRuleScopeName != null) { // push - final ScopeListElement base = localStack.isEmpty() - ? stack.contentNameScopesList - : localStack.getLast().scopes; - final ScopeListElement captureRuleScopesList = base.push(grammar, captureRuleScopeName); + final var base = localStack.isEmpty() ? stack.contentNameScopesList : localStack.getLast().scopes; + final var captureRuleScopesList = base.push(grammar, captureRuleScopeName); localStack.add(new LocalStackElement(captureRuleScopesList, captureIndex.end)); } } @@ -496,13 +483,24 @@ private void handleCaptures(final Grammar grammar, final OnigString lineText, fi } /** - * Walk the stack from bottom to top, and check each while condition in this - * order. If any fails, cut off the entire stack above the failed while - * condition. While conditions may also advance the linePosition. + * Walk the stack from bottom to top, and check each while condition in this order. + * If any fails, cut off the entire stack above the failed while condition. + * While conditions may also advance the linePosition. */ private WhileCheckResult checkWhileConditions(final Grammar grammar, final OnigString lineText, boolean isFirstLine, - int linePos, StackElement stack, final LineTokens lineTokens) { - int currentanchorPosition = stack.beginRuleCapturedEOL ? 0 : -1; + int linePos, StackElement stack, final LineTokens lineTokens) { + int anchorPosition = stack.beginRuleCapturedEOL ? 0 : -1; + + final class WhileStack { + final StackElement stack; + final BeginWhileRule rule; + + WhileStack(final StackElement stack, final BeginWhileRule rule) { + this.stack = stack; + this.rule = rule; + } + } + final var whileRules = new ArrayList(); for (StackElement node = stack; node != null; node = node.pop()) { final Rule nodeRule = node.getRule(grammar); @@ -513,8 +511,9 @@ private WhileCheckResult checkWhileConditions(final Grammar grammar, final OnigS for (int i = whileRules.size() - 1; i >= 0; i--) { final var whileRule = whileRules.get(i); + final var ruleScanner = whileRule.rule.compileWhileAG(whileRule.stack.endRule, isFirstLine, - currentanchorPosition == linePos); + anchorPosition == linePos); final var r = ruleScanner.scanner.findNextMatchSync(lineText, linePos); if (LOGGER.isLoggable(TRACE)) { LOGGER.log(TRACE, " scanning for while rule"); @@ -523,7 +522,7 @@ private WhileCheckResult checkWhileConditions(final Grammar grammar, final OnigS if (r != null) { final RuleId matchedRuleId = ruleScanner.rules[r.getIndex()]; - if (!RuleId.WHILE_RULE.equals(matchedRuleId)) { + if (RuleId.WHILE_RULE.notEquals(matchedRuleId)) { // we shouldn't end up here stack = castNonNull(whileRule.stack.pop()); break; @@ -531,9 +530,9 @@ private WhileCheckResult checkWhileConditions(final Grammar grammar, final OnigS if (r.getCaptureIndices().length > 0) { lineTokens.produce(whileRule.stack, r.getCaptureIndices()[0].start); handleCaptures(grammar, lineText, isFirstLine, whileRule.stack, lineTokens, - whileRule.rule.whileCaptures, r.getCaptureIndices()); + whileRule.rule.whileCaptures, r.getCaptureIndices()); lineTokens.produce(whileRule.stack, r.getCaptureIndices()[0].end); - currentanchorPosition = r.getCaptureIndices()[0].end; + anchorPosition = r.getCaptureIndices()[0].end; if (r.getCaptureIndices()[0].end > linePos) { linePos = r.getCaptureIndices()[0].end; isFirstLine = false; @@ -545,12 +544,12 @@ private WhileCheckResult checkWhileConditions(final Grammar grammar, final OnigS } } - return new WhileCheckResult(stack, linePos, currentanchorPosition, isFirstLine); + return new WhileCheckResult(stack, linePos, anchorPosition, isFirstLine); } static StackElement tokenizeString(final Grammar grammar, final OnigString lineText, final boolean isFirstLine, - final int linePos, final StackElement stack, final LineTokens lineTokens, - final boolean checkWhileConditions) { + final int linePos, final StackElement stack, final LineTokens lineTokens, + final boolean checkWhileConditions) { return new LineTokenizer(grammar, lineText, isFirstLine, linePos, stack, lineTokens).scan(checkWhileConditions); } From 9a6a13fe13aee2fd7eab55f97e073c4801738931 Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 16 May 2022 16:47:13 +0200 Subject: [PATCH 11/41] Reformat BalancedBracketSelectors --- .../grammar/BalancedBracketSelectors.java | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BalancedBracketSelectors.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BalancedBracketSelectors.java index 8a3e3dee9..de1c4e0fa 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BalancedBracketSelectors.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BalancedBracketSelectors.java @@ -28,20 +28,22 @@ public class BalancedBracketSelectors { private boolean allowAny = false; - BalancedBracketSelectors(final List balancedBracketScopes, final List unbalancedBracketScopes) { + public BalancedBracketSelectors( + final List balancedBracketScopes, + final List unbalancedBracketScopes) { this.balancedBracketScopes = balancedBracketScopes.stream() - .flatMap(selector -> { - if ("*".equals(selector)) { - this.allowAny = true; - return Stream.empty(); - } - return Matcher.createMatchers(selector).stream().map(m -> m.matcher); - }) - .toArray(Matcher[]::new); + .flatMap(selector -> { + if ("*".equals(selector)) { + this.allowAny = true; + return Stream.empty(); + } + return Matcher.createMatchers(selector).stream().map(m -> m.matcher); + }) + .toArray(Matcher[]::new); this.unbalancedBracketScopes = unbalancedBracketScopes.stream() - .flatMap(selector -> Matcher.createMatchers(selector).stream().map(m -> m.matcher)) - .toArray(Matcher[]::new); + .flatMap(selector -> Matcher.createMatchers(selector).stream().map(m -> m.matcher)) + .toArray(Matcher[]::new); } boolean matchesAlways() { From 12d2f1da2eac2468cdf4e1ed95ce15047305d35c Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 16 May 2022 16:47:40 +0200 Subject: [PATCH 12/41] Change formatter indention --- org.eclipse.tm4e.core/.settings/org.eclipse.jdt.core.prefs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.eclipse.tm4e.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.tm4e.core/.settings/org.eclipse.jdt.core.prefs index 1cac7c649..170a5d700 100644 --- a/org.eclipse.tm4e.core/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.tm4e.core/.settings/org.eclipse.jdt.core.prefs @@ -233,8 +233,8 @@ org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=true org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=2 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.continuation_indentation=1 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=1 org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false From 760b523aa494585ecf4cbafa1b60c9967967d389 Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 16 May 2022 16:59:20 +0200 Subject: [PATCH 13/41] Change PListParser to accept Reader instead of InputStream --- .../tm4e/core/internal/grammar/reader/GrammarReader.java | 8 +++----- .../eclipse/tm4e/core/internal/parser/PListParser.java | 4 ++-- .../tm4e/core/internal/parser/PListParserJSON.java | 8 +++----- .../eclipse/tm4e/core/internal/parser/PListParserXML.java | 6 +++--- .../tm4e/core/internal/parser/PListParserYAML.java | 6 +++--- .../tm4e/core/internal/theme/reader/SyncThemeReader.java | 3 ++- .../tm4e/core/internal/parser/PListParserTest.java | 8 +++++--- 7 files changed, 21 insertions(+), 22 deletions(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/reader/GrammarReader.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/reader/GrammarReader.java index 931ed7141..18b1c86b0 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/reader/GrammarReader.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/reader/GrammarReader.java @@ -17,6 +17,7 @@ package org.eclipse.tm4e.core.internal.grammar.reader; import java.io.InputStream; +import java.io.InputStreamReader; import org.eclipse.tm4e.core.internal.grammar.RawRule; import org.eclipse.tm4e.core.internal.grammar.RawCaptures; @@ -41,10 +42,7 @@ public final class GrammarReader { } return switch (path.last()) { case RawRule.REPOSITORY -> new RawRepository(); - case RawRule.BEGIN_CAPTURES, - RawRule.CAPTURES, - RawRule.END_CAPTURES, - RawRule.WHILE_CAPTURES -> new RawCaptures(); + case RawRule.BEGIN_CAPTURES, RawRule.CAPTURES, RawRule.END_CAPTURES, RawRule.WHILE_CAPTURES -> new RawCaptures(); default -> new RawRule(); }; }; @@ -54,7 +52,7 @@ public final class GrammarReader { private static final PListParser YAML_PARSER = new PListParserYAML<>(OBJECT_FACTORY); public static IRawGrammar readGrammarSync(final String filePath, final InputStream in) throws Exception { - return getGrammarParser(filePath).parse(in); + return getGrammarParser(filePath).parse(new InputStreamReader(in)); } private static PListParser getGrammarParser(final String filePath) { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListParser.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListParser.java index a8cb26e9b..686672dc8 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListParser.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListParser.java @@ -12,8 +12,8 @@ */ package org.eclipse.tm4e.core.internal.parser; -import java.io.InputStream; +import java.io.Reader; public interface PListParser { - T parse(InputStream contents) throws Exception; + T parse(Reader contents) throws Exception; } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListParserJSON.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListParserJSON.java index b1e792483..b25c8d0a1 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListParserJSON.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListParserJSON.java @@ -12,9 +12,7 @@ package org.eclipse.tm4e.core.internal.parser; import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.nio.charset.StandardCharsets; +import java.io.Reader; import org.xml.sax.SAXException; @@ -29,9 +27,9 @@ public PListParserJSON(final PropertySettable.Factory objectFactory) } @Override - public T parse(final InputStream contents) throws IOException, SAXException { + public T parse(final Reader contents) throws IOException, SAXException { final var pList = new PListContentHandler(objectFactory); - try (final var reader = new JsonReader(new InputStreamReader(contents, StandardCharsets.UTF_8))) { + try (final var reader = new JsonReader(contents)) { // reader.setLenient(true); boolean parsing = true; pList.startElement(null, "plist", null, null); diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListParserXML.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListParserXML.java index f001af3d4..657b56dac 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListParserXML.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListParserXML.java @@ -13,7 +13,7 @@ import java.io.ByteArrayInputStream; import java.io.IOException; -import java.io.InputStream; +import java.io.Reader; import javax.xml.XMLConstants; import javax.xml.parsers.ParserConfigurationException; @@ -32,7 +32,7 @@ public PListParserXML(final PropertySettable.Factory objectFactory) { } @Override - public T parse(final InputStream contents) throws IOException, ParserConfigurationException, SAXException { + public T parse(final Reader contents) throws IOException, ParserConfigurationException, SAXException { final var spf = SAXParserFactory.newInstance(); spf.setNamespaceAware(true); @@ -48,7 +48,7 @@ public T parse(final InputStream contents) throws IOException, ParserConfigurati final XMLReader xmlReader = saxParser.getXMLReader(); xmlReader.setEntityResolver((publicId, systemId) -> new InputSource( - new ByteArrayInputStream("".getBytes()))); + new ByteArrayInputStream("".getBytes()))); final var result = new PListContentHandler(objectFactory); xmlReader.setContentHandler(result); xmlReader.parse(new InputSource(contents)); diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListParserYAML.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListParserYAML.java index c2fb68325..ad8930dd4 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListParserYAML.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/parser/PListParserYAML.java @@ -14,7 +14,7 @@ import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*; -import java.io.InputStream; +import java.io.Reader; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -53,7 +53,7 @@ private void addListToPList(final PListContentHandler pList, final List pList, final Map map) - throws SAXException { + throws SAXException { pList.startElement(null, "dict", null, null); for (final Entry entry : map.entrySet()) { @@ -79,7 +79,7 @@ private void addStringToPList(final PListContentHandler pList, final String v } @Override - public T parse(final InputStream contents) throws SAXException, YAMLException { + public T parse(final Reader contents) throws SAXException, YAMLException { final var pList = new PListContentHandler(objectFactory); pList.startElement(null, "plist", null, null); addMapToPList(pList, new Yaml().loadAs(contents, Map.class)); diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/SyncThemeReader.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/SyncThemeReader.java index ecd1a1127..3019586a1 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/SyncThemeReader.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/SyncThemeReader.java @@ -17,6 +17,7 @@ package org.eclipse.tm4e.core.internal.theme.reader; import java.io.InputStream; +import java.io.InputStreamReader; import org.eclipse.tm4e.core.internal.parser.PListParser; import org.eclipse.tm4e.core.internal.theme.IRawTheme; @@ -32,6 +33,6 @@ final class SyncThemeReader { } IRawTheme load() throws Exception { - return this.parser.parse(in); + return this.parser.parse(new InputStreamReader(in)); } } diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/parser/PListParserTest.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/parser/PListParserTest.java index 2e24fc2f0..f1c0d46ff 100644 --- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/parser/PListParserTest.java +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/parser/PListParserTest.java @@ -13,6 +13,8 @@ import static org.junit.jupiter.api.Assertions.*; +import java.io.InputStreamReader; + import org.eclipse.tm4e.core.Data; import org.eclipse.tm4e.core.internal.grammar.RawGrammar; import org.eclipse.tm4e.core.internal.grammar.reader.GrammarReader; @@ -24,7 +26,7 @@ public class PListParserTest { void testParseJSONPList() throws Exception { final var parser = new PListParserJSON(GrammarReader.OBJECT_FACTORY); try (final var is = Data.class.getResourceAsStream("csharp.json")) { - final var grammar = parser.parse(is); + final var grammar = parser.parse(new InputStreamReader(is)); assertNotNull(grammar); assertFalse(grammar.getFileTypes().isEmpty()); System.out.println(grammar); @@ -35,7 +37,7 @@ void testParseJSONPList() throws Exception { void testParseYAMLPlist() throws Exception { final var parser = new PListParserYAML(GrammarReader.OBJECT_FACTORY); try (final var is = Data.class.getResourceAsStream("JavaScript.tmLanguage.yaml")) { - final var grammar = parser.parse(is); + final var grammar = parser.parse(new InputStreamReader(is)); assertNotNull(grammar); assertFalse(grammar.getFileTypes().isEmpty()); System.out.println(grammar); @@ -46,7 +48,7 @@ void testParseYAMLPlist() throws Exception { void testParseXMLPlist() throws Exception { final var parser = new PListParserXML(GrammarReader.OBJECT_FACTORY); try (final var is = Data.class.getResourceAsStream("JavaScript.tmLanguage")) { - final var grammar = parser.parse(is); + final var grammar = parser.parse(new InputStreamReader(is)); assertNotNull(grammar); assertFalse(grammar.getFileTypes().isEmpty()); System.out.println(grammar); From a9e2b1e0a4095484b95f1db7160b1471e43dafea Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 16 May 2022 17:08:21 +0200 Subject: [PATCH 14/41] Make TokenTypeMatcher a class --- .../eclipse/tm4e/core/internal/grammar/Grammar.java | 12 +----------- .../tm4e/core/internal/grammar/LineTokens.java | 8 ++++---- .../tm4e/core/internal/grammar/TokenTypeMatcher.java | 10 +++++++--- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java index 7d4e4d816..813864667 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java @@ -94,17 +94,7 @@ public Grammar( final var selector = entry.getKey(); final var type = entry.getValue().intValue(); for (final var matcher : Matcher.createMatchers(selector)) { - tokenTypeMatchers.add(new TokenTypeMatcher() { - @Override - public int getType() { - return type; - } - - @Override - public Matcher> getMatcher() { - return matcher.matcher; - } - }); + tokenTypeMatchers.add(new TokenTypeMatcher(matcher.matcher, type)); } } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java index e40704cf3..3b55fadcd 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java @@ -94,16 +94,16 @@ void produceFromScopes(final ScopeListElement scopesList, final int endIndex) { containsBalancedBrackets = true; } - if (!tokenTypeOverrides.isEmpty() || (balancedBracketSelectors != null - && !balancedBracketSelectors.matchesAlways() && !balancedBracketSelectors.matchesNever())) { + if (!tokenTypeOverrides.isEmpty() || balancedBracketSelectors != null + && !balancedBracketSelectors.matchesAlways() && !balancedBracketSelectors.matchesNever()) { // Only generate scope array when required to improve performance final var scopes = scopesList.generateScopes(); for (final var tokenType : tokenTypeOverrides) { - if (tokenType.getMatcher().matches(scopes)) { + if (tokenType.matcher.matches(scopes)) { metadata = StackElementMetadata.set( metadata, 0, - tokenType.getType(), // toOptionalTokenType(tokenType.type), + tokenType.type, // toOptionalTokenType(tokenType.type), null, FontStyle.NotSet, 0, diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenTypeMatcher.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenTypeMatcher.java index 66d4bd725..e3554bd7d 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenTypeMatcher.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenTypeMatcher.java @@ -21,9 +21,13 @@ import org.eclipse.tm4e.core.internal.matcher.Matcher; -public interface TokenTypeMatcher { +final class TokenTypeMatcher { - Matcher> getMatcher(); + final Matcher> matcher; + final int /*StandardTokenType*/ type; - int /*StandardTokenType*/ getType(); + TokenTypeMatcher(final Matcher> matcher, final int type) { + this.matcher = matcher; + this.type = type; + } } From bc6c6832cfa9732f4681b1f4e8315544503ee82a Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 16 May 2022 17:12:10 +0200 Subject: [PATCH 15/41] Add missing test grammar --- .../core/grammar/GrammarInjectionTest.java | 1 + .../resources/org/eclipse/tm4e/core/css.json | 629 ++++++++++++++++++ 2 files changed, 630 insertions(+) create mode 100644 org.eclipse.tm4e.core/src/test/resources/org/eclipse/tm4e/core/css.json diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarInjectionTest.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarInjectionTest.java index 5f74e5d1c..c8cd60fe6 100644 --- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarInjectionTest.java +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarInjectionTest.java @@ -65,6 +65,7 @@ public Collection getInjections(@Nullable final String scopeName) { public String getFilePath(@Nullable final String scopeName) { if (scopeName != null) { return switch (scopeName) { + case "css.json" -> "css.json"; case "source.js" -> "JavaScript.tmLanguage.json"; case "text.html.basic" -> "html.json"; case "source.ts" -> "TypeScript.tmLanguage.json"; diff --git a/org.eclipse.tm4e.core/src/test/resources/org/eclipse/tm4e/core/css.json b/org.eclipse.tm4e.core/src/test/resources/org/eclipse/tm4e/core/css.json new file mode 100644 index 000000000..71a9eb0d4 --- /dev/null +++ b/org.eclipse.tm4e.core/src/test/resources/org/eclipse/tm4e/core/css.json @@ -0,0 +1,629 @@ +{ + "fileTypes": [ + "css", + "css.erb" + ], + "keyEquivalent": "^~C", + "name": "CSS", + "patterns": [ + { + "include": "#comment-block" + }, + { + "include": "#selector" + }, + { + "begin": "\\s*((@)charset\\b)\\s*", + "captures": { + "1": { + "name": "keyword.control.at-rule.charset.css" + }, + "2": { + "name": "punctuation.definition.keyword.css" + } + }, + "end": "\\s*((?=;|$))", + "name": "meta.at-rule.charset.css", + "patterns": [ + { + "include": "#string-double" + }, + { + "include": "#string-single" + } + ] + }, + { + "begin": "\\s*((@)import\\b)\\s*", + "captures": { + "1": { + "name": "keyword.control.at-rule.import.css" + }, + "2": { + "name": "punctuation.definition.keyword.css" + } + }, + "end": "\\s*((?=;|\\}))", + "name": "meta.at-rule.import.css", + "patterns": [ + { + "include": "#string-double" + }, + { + "include": "#string-single" + }, + { + "begin": "\\s*(url)\\s*(\\()\\s*", + "beginCaptures": { + "1": { + "name": "support.function.url.css" + }, + "2": { + "name": "punctuation.section.function.css" + } + }, + "end": "\\s*(\\))\\s*", + "endCaptures": { + "1": { + "name": "punctuation.section.function.css" + } + }, + "patterns": [ + { + "match": "[^'\") \\t]+", + "name": "variable.parameter.url.css" + }, + { + "include": "#string-single" + }, + { + "include": "#string-double" + } + ] + }, + { + "include": "#media-query-list" + } + ] + }, + { + "begin": "^\\s*((@)font-face)\\s*(?=\\{)", + "beginCaptures": { + "1": { + "name": "keyword.control.at-rule.font-face.css" + }, + "2": { + "name": "punctuation.definition.keyword.css" + } + }, + "end": "(?!\\G)", + "name": "meta.at-rule.font-face.css", + "patterns": [ + { + "include": "#rule-list" + } + ] + }, + { + "begin": "(?=^\\s*@media\\s*.*?\\{)", + "end": "\\s*(\\})", + "endCaptures": { + "1": { + "name": "punctuation.section.property-list.end.css" + } + }, + "patterns": [ + { + "begin": "^\\s*((@)media)(?=.*?\\{)", + "beginCaptures": { + "1": { + "name": "keyword.control.at-rule.media.css" + }, + "2": { + "name": "punctuation.definition.keyword.css" + }, + "3": { + "name": "support.constant.media.css" + } + }, + "end": "\\s*(?=\\{)", + "name": "meta.at-rule.media.css", + "patterns": [ + { + "include": "#media-query-list" + } + ] + }, + { + "begin": "\\s*(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.section.property-list.begin.css" + } + }, + "end": "(?=\\})", + "patterns": [ + { + "include": "$self" + } + ] + } + ] + }, + { + "begin": "(?=\\{)", + "end": "(?!\\G)", + "patterns": [ + { + "include": "#rule-list" + } + ] + } + ], + "repository": { + "color-values": { + "patterns": [ + { + "comment": "http://www.w3.org/TR/CSS21/syndata.html#value-def-color", + "match": "\\b(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)\\b", + "name": "support.constant.color.w3c-standard-color-name.css" + }, + { + "comment": "These colours are mostly recognised but will not validate. ref: http://www.w3schools.com/css/css_colornames.asp", + "match": "\\b(aliceblue|antiquewhite|aquamarine|azure|beige|bisque|blanchedalmond|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|gainsboro|ghostwhite|gold|goldenrod|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|limegreen|linen|magenta|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|oldlace|olivedrab|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|thistle|tomato|turquoise|violet|wheat|whitesmoke|yellowgreen)\\b", + "name": "invalid.deprecated.color.w3c-non-standard-color-name.css" + }, + { + "begin": "(hsla?|rgba?)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "support.function.misc.css" + }, + "2": { + "name": "punctuation.section.function.css" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.function.css" + } + }, + "patterns": [ + { + "match": "(?x)\\b\n\t\t\t\t\t\t\t (0*((1?[0-9]{1,2})|(2([0-4][0-9]|5[0-5])))\\s*,\\s*){2}\n\t\t\t\t\t\t\t (0*((1?[0-9]{1,2})|(2([0-4][0-9]|5[0-5])))\\b)\n\t\t\t\t\t\t\t (\\s*,\\s*((0?\\.[0-9]+)|[0-1]))?\n\t\t\t\t\t\t\t", + "name": "constant.other.color.rgb-value.css" + }, + { + "match": "\\b([0-9]{1,2}|100)\\s*%,\\s*([0-9]{1,2}|100)\\s*%,\\s*([0-9]{1,2}|100)\\s*%", + "name": "constant.other.color.rgb-percentage.css" + }, + { + "include": "#numeric-values" + } + ] + } + ] + }, + "comment-block": { + "begin": "/\\*", + "captures": { + "0": { + "name": "punctuation.definition.comment.css" + } + }, + "end": "\\*/", + "name": "comment.block.css" + }, + "media-query": { + "begin": "(?i)\\s*(only|not)?\\s*(all|aural|braille|embossed|handheld|print|projection|screen|tty|tv)?", + "beginCaptures": { + "1": { + "name": "keyword.operator.logic.media.css" + }, + "2": { + "name": "support.constant.media.css" + } + }, + "end": "\\s*(?:(,)|(?=[{;]))", + "endCaptures": { + "1": { + "name": "punctuation.definition.arbitrary-repetition.css" + } + }, + "patterns": [ + { + "begin": "\\s*(and)?\\s*(\\()\\s*", + "beginCaptures": { + "1": { + "name": "keyword.operator.logic.media.css" + } + }, + "end": "\\)", + "patterns": [ + { + "begin": "(?x)\n\t (\n\t ((min|max)-)?\n\t (\n\t ((device-)?(height|width|aspect-ratio))|\n\t (color(-index)?)|monochrome|resolution\n\t )\n\t )|grid|scan|orientation\n\t \\s*(?=[:)])", + "beginCaptures": { + "0": { + "name": "support.type.property-name.media.css" + } + }, + "end": "(:)|(?=\\))", + "endCaptures": { + "1": { + "name": "punctuation.separator.key-value.css" + } + } + }, + { + "match": "\\b(portrait|landscape|progressive|interlace)", + "name": "support.constant.property-value.css" + }, + { + "captures": { + "1": { + "name": "constant.numeric.css" + }, + "2": { + "name": "keyword.operator.arithmetic.css" + }, + "3": { + "name": "constant.numeric.css" + } + }, + "match": "\\s*(\\d+)(/)(\\d+)" + }, + { + "include": "#numeric-values" + } + ] + } + ] + }, + "media-query-list": { + "begin": "\\s*(?=[^{;])", + "end": "\\s*(?=[{;])", + "patterns": [ + { + "include": "#media-query" + } + ] + }, + "numeric-values": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.constant.css" + } + }, + "match": "(#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\b", + "name": "constant.other.color.rgb-value.css" + }, + { + "captures": { + "1": { + "name": "keyword.other.unit.css" + } + }, + "match": "(?x)\n\t\t\t\t\t (?:-|\\+)?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))\n\t\t\t\t\t ((?:px|pt|ch|cm|mm|in|r?em|ex|pc|deg|g?rad|dpi|dpcm|s)\\b|%)?\n\t\t\t\t\t", + "name": "constant.numeric.css" + } + ] + }, + "property-values": { + "patterns": [ + { + "match": "\\b(absolute|all(-scroll)?|always|armenian|auto|avoid|baseline|below|bidi-override|block|bold|bolder|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|geometricPrecision|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|optimize(Legibility|Quality|Speed)|outset|outside|overline|pointer|pre(-(wrap|line))?|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|sub|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical(-(ideographic|text))?|visible(Painted|Fill|Stroke)?|w-resize|wait|whitespace|zero|smaller|larger|((xx?-)?(small|large))|painted|fill|stroke)\\b", + "name": "support.constant.property-value.css" + }, + { + "match": "(\\b(?i:arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace)\\b)", + "name": "support.constant.font-name.css" + }, + { + "include": "#numeric-values" + }, + { + "include": "#color-values" + }, + { + "include": "#string-double" + }, + { + "include": "#string-single" + }, + { + "begin": "(rect)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "support.function.misc.css" + }, + "2": { + "name": "punctuation.section.function.css" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.function.css" + } + }, + "patterns": [ + { + "include": "#numeric-values" + } + ] + }, + { + "begin": "(format|local|url|attr|counter|counters)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "support.function.misc.css" + }, + "2": { + "name": "punctuation.section.function.css" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.function.css" + } + }, + "patterns": [ + { + "include": "#string-single" + }, + { + "include": "#string-double" + }, + { + "match": "[^'\") \\t]+", + "name": "variable.parameter.misc.css" + } + ] + }, + { + "match": "\\!\\s*important", + "name": "keyword.other.important.css" + } + ] + }, + "rule-list": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.property-list.begin.css" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.property-list.end.css" + } + }, + "name": "meta.property-list.css", + "patterns": [ + { + "include": "#comment-block" + }, + { + "begin": "(?(['\"])(?:[^\\\\]|\\\\.)*?(\\6)))))?\\s*(\\])", + "name": "meta.attribute-selector.css" + } + ] + }, + "string-double": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.css" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.css" + } + }, + "name": "string.quoted.double.css", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.css" + } + ] + }, + "string-single": { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.css" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.css" + } + }, + "name": "string.quoted.single.css", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.css" + } + ] + } + }, + "scopeName": "source.css" +} \ No newline at end of file From 3f91b2dc0d0a77ed9aef1cae3323c075772b0774 Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 16 May 2022 17:22:08 +0200 Subject: [PATCH 16/41] Reformat LineTokens --- .../core/internal/grammar/LineTokens.java | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java index 3b55fadcd..0e0786c48 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java @@ -63,7 +63,7 @@ final class LineTokens { private final BalancedBracketSelectors balancedBracketSelectors; LineTokens(final boolean emitBinaryTokens, final String lineText, final List tokenTypeOverrides, - @Nullable final BalancedBracketSelectors balancedBracketSelectors) { + @Nullable final BalancedBracketSelectors balancedBracketSelectors) { this.emitBinaryTokens = emitBinaryTokens; this.lineText = LOGGER.isLoggable(TRACE) ? lineText : null; // store line only if it's logged if (this.emitBinaryTokens) { @@ -101,13 +101,13 @@ void produceFromScopes(final ScopeListElement scopesList, final int endIndex) { for (final var tokenType : tokenTypeOverrides) { if (tokenType.matcher.matches(scopes)) { metadata = StackElementMetadata.set( - metadata, - 0, + metadata, + 0, tokenType.type, // toOptionalTokenType(tokenType.type), - null, - FontStyle.NotSet, - 0, - 0); + null, + FontStyle.NotSet, + 0, + 0); } } if (balancedBracketSelectors != null) { @@ -117,13 +117,13 @@ void produceFromScopes(final ScopeListElement scopesList, final int endIndex) { if (containsBalancedBrackets) { metadata = StackElementMetadata.set( - metadata, - 0, - OptionalStandardTokenType.NotSet, - containsBalancedBrackets, - FontStyle.NotSet, - 0, - 0); + metadata, + 0, + OptionalStandardTokenType.NotSet, + containsBalancedBrackets, + FontStyle.NotSet, + 0, + 0); } if (!this.binaryTokens.isEmpty() && getLastElement(this.binaryTokens) == metadata) { @@ -135,10 +135,10 @@ void produceFromScopes(final ScopeListElement scopesList, final int endIndex) { if (LOGGER.isLoggable(TRACE)) { final List scopes = scopesList.generateScopes(); LOGGER.log(TRACE, " token: |" + - castNonNull(this.lineText) - .substring(this.lastTokenEndIndex >= 0 ? this.lastTokenEndIndex : 0, endIndex) - .replace("\n", "\\n") - + '|'); + castNonNull(this.lineText) + .substring(this.lastTokenEndIndex >= 0 ? this.lastTokenEndIndex : 0, endIndex) + .replace("\n", "\\n") + + '|'); for (final String scope : scopes) { LOGGER.log(TRACE, " * " + scope); } @@ -155,19 +155,19 @@ void produceFromScopes(final ScopeListElement scopesList, final int endIndex) { if (LOGGER.isLoggable(TRACE)) { LOGGER.log(TRACE, " token: |" + - castNonNull(this.lineText) - .substring(this.lastTokenEndIndex >= 0 ? this.lastTokenEndIndex : 0, endIndex) - .replace("\n", "\\n") - + '|'); + castNonNull(this.lineText) + .substring(this.lastTokenEndIndex >= 0 ? this.lastTokenEndIndex : 0, endIndex) + .replace("\n", "\\n") + + '|'); for (final String scope : scopes) { LOGGER.log(TRACE, " * " + scope); } } this.tokens.add(new Token( - this.lastTokenEndIndex >= 0 ? this.lastTokenEndIndex : 0, - endIndex, - scopes)); + this.lastTokenEndIndex >= 0 ? this.lastTokenEndIndex : 0, + endIndex, + scopes)); this.lastTokenEndIndex = endIndex; } From d289122ccefeb7a423ffce3053cda3c575696ba3 Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 16 May 2022 17:24:51 +0200 Subject: [PATCH 17/41] Make RawRule setter fluent --- .../eclipse/tm4e/core/internal/grammar/Grammar.java | 9 ++++----- .../eclipse/tm4e/core/internal/grammar/RawRule.java | 11 +++++++---- .../eclipse/tm4e/core/internal/rule/RuleFactory.java | 4 +--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java index 813864667..e407e4994 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java @@ -238,11 +238,10 @@ private IRawGrammar initGrammar(IRawGrammar grammar, @Nullable final IRawRule ba grammar.setRepository(repo); } - final var self = new RawRule(); - self.setPatterns(grammar.getPatterns()); - self.setName(grammar.getScopeName()); - repo.setSelf(self); - repo.setBase(base != null ? base : self); + repo.setSelf(new RawRule() + .setName(grammar.getScopeName()) + .setPatterns(grammar.getPatterns())); + repo.setBase(base != null ? base : repo.getSelf()); return grammar; } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/RawRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/RawRule.java index e5d972862..9de03786c 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/RawRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/RawRule.java @@ -24,7 +24,7 @@ import org.eclipse.tm4e.core.internal.utils.DeepCloneable; public class RawRule extends HashMap - implements IRawRule, DeepCloneable, PropertySettable { + implements IRawRule, DeepCloneable, PropertySettable { private static final String APPLY_END_PATTERN_LAST = "applyEndPatternLast"; private static final String BEGIN = "begin"; @@ -70,8 +70,9 @@ public String getName() { return (String) get(NAME); } - public void setName(final String name) { + public RawRule setName(final String name) { super.put(NAME, name); + return this; } @Nullable @@ -124,8 +125,9 @@ public String getInclude() { return (String) get(INCLUDE); } - public void setInclude(@Nullable final String include) { + public RawRule setInclude(@Nullable final String include) { super.put(INCLUDE, include); + return this; } @Nullable @@ -162,8 +164,9 @@ public Collection getPatterns() { return (Collection) get(PATTERNS); } - public void setPatterns(final @Nullable Collection patterns) { + public RawRule setPatterns(final @Nullable Collection patterns) { super.put(PATTERNS, patterns); + return this; } @Nullable diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java index 318b81389..a7d2ed7db 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java @@ -67,9 +67,7 @@ public static RuleId getCompiledRuleId(final IRawRule desc, final IRuleFactoryHe : IRawRepository.merge(repository, desc.getRepository()); var patterns = desc.getPatterns(); if (patterns == null && desc.getInclude() != null) { - final var includeRule = new RawRule(); - includeRule.setInclude(desc.getInclude()); - patterns = List.of(includeRule); + patterns = List.of(new RawRule().setInclude(desc.getInclude())); } return new IncludeOnlyRule( /* desc.$vscodeTextmateLocation, */ From ee3af0cc96a913e158c706399dbd14ee48bc0b1c Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 16 May 2022 17:27:29 +0200 Subject: [PATCH 18/41] Change ThemeReader to accept Reader instead of Inputstream --- .../tm4e/core/internal/theme/AbstractThemeTest.java | 8 ++++---- .../tm4e/core/internal/theme/reader/SyncThemeReader.java | 9 ++++----- .../tm4e/core/internal/theme/reader/ThemeReader.java | 8 ++++---- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/AbstractThemeTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/AbstractThemeTest.java index 78ba8188f..fd1e91b52 100644 --- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/AbstractThemeTest.java +++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/AbstractThemeTest.java @@ -17,7 +17,7 @@ */ package org.eclipse.tm4e.core.internal.theme; -import java.io.ByteArrayInputStream; +import java.io.StringReader; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; @@ -61,10 +61,10 @@ protected static Theme createTheme(final ParsedThemeRule... rules) { protected static Theme createTheme(final String themeAsJsonString) throws Exception { return Theme.createFromRawTheme( - ThemeReader.readThemeSync("theme.json", new ByteArrayInputStream(themeAsJsonString.getBytes())), null); + ThemeReader.readThemeSync("theme.json", new StringReader(themeAsJsonString)), null); } - protected static List parseTheme(final String theme) throws Exception { - return Theme.parseTheme(ThemeReader.readThemeSync("theme.json", new ByteArrayInputStream(theme.getBytes()))); + protected static List parseTheme(final String themeAsJsonString) throws Exception { + return Theme.parseTheme(ThemeReader.readThemeSync("theme.json", new StringReader(themeAsJsonString))); } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/SyncThemeReader.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/SyncThemeReader.java index 3019586a1..484b52f47 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/SyncThemeReader.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/SyncThemeReader.java @@ -16,23 +16,22 @@ */ package org.eclipse.tm4e.core.internal.theme.reader; -import java.io.InputStream; -import java.io.InputStreamReader; +import java.io.Reader; import org.eclipse.tm4e.core.internal.parser.PListParser; import org.eclipse.tm4e.core.internal.theme.IRawTheme; final class SyncThemeReader { - private final InputStream in; + private final Reader in; private final PListParser parser; - SyncThemeReader(final InputStream in, final PListParser parser) { + SyncThemeReader(final Reader in, final PListParser parser) { this.in = in; this.parser = parser; } IRawTheme load() throws Exception { - return this.parser.parse(new InputStreamReader(in)); + return this.parser.parse(in); } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/ThemeReader.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/ThemeReader.java index b4af3a1d6..18fdbc8ac 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/ThemeReader.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/ThemeReader.java @@ -16,14 +16,14 @@ */ package org.eclipse.tm4e.core.internal.theme.reader; -import java.io.InputStream; +import java.io.Reader; -import org.eclipse.tm4e.core.internal.parser.PListPath; -import org.eclipse.tm4e.core.internal.parser.PropertySettable; import org.eclipse.tm4e.core.internal.parser.PListParser; import org.eclipse.tm4e.core.internal.parser.PListParserJSON; import org.eclipse.tm4e.core.internal.parser.PListParserXML; import org.eclipse.tm4e.core.internal.parser.PListParserYAML; +import org.eclipse.tm4e.core.internal.parser.PListPath; +import org.eclipse.tm4e.core.internal.parser.PropertySettable; import org.eclipse.tm4e.core.internal.theme.IRawTheme; import org.eclipse.tm4e.core.internal.theme.ThemeRaw; @@ -39,7 +39,7 @@ public final class ThemeReader { private static final PListParserYAML YAML_PARSER = new PListParserYAML<>(OBJECT_FACTORY); private static final PListParserXML XML_PARSER = new PListParserXML<>(OBJECT_FACTORY); - public static IRawTheme readThemeSync(final String filePath, final InputStream in) throws Exception { + public static IRawTheme readThemeSync(final String filePath, final Reader in) throws Exception { final var reader = new SyncThemeReader(in, getThemeParser(filePath)); return reader.load(); } From 6c14ad065fa5e78146cf42a93ed57eaf15232f72 Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 16 May 2022 17:38:22 +0200 Subject: [PATCH 19/41] Refactor Grammar class according upstream project --- .../tm4e/core/internal/grammar/Grammar.java | 144 ++++++++++++------ 1 file changed, 94 insertions(+), 50 deletions(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java index e407e4994..51ee1ec81 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java @@ -56,13 +56,13 @@ public final class Grammar implements IGrammar, IRuleFactoryHelper { private static final Logger LOGGER = System.getLogger(Grammar.class.getName()); - private final String scopeName; + private final String rootScopeName; @Nullable private RuleId rootId = null; private int lastRuleId = 0; private final Map ruleId2desc = new HashMap<>(); - private final Map includedGrammars = new HashMap<>(); + private final Map includedGrammars = new HashMap<>(); private final IGrammarRepository grammarRepository; private final IRawGrammar grammar; @@ -75,24 +75,25 @@ public final class Grammar implements IGrammar, IRuleFactoryHelper { private final BalancedBracketSelectors balancedBracketSelectors; public Grammar( - final String scopeName, - final IRawGrammar grammar, - final int initialLanguage, - @Nullable final Map embeddedLanguages, - @Nullable final Map tokenTypes, - @Nullable final BalancedBracketSelectors balancedBracketSelectors, - final IGrammarRepository grammarRepository, - final IThemeProvider themeProvider) { - this.scopeName = scopeName; + final String rootScopeName, + final IRawGrammar grammar, + final int initialLanguage, + @Nullable final Map embeddedLanguages, + @Nullable final Map tokenTypes, + @Nullable final BalancedBracketSelectors balancedBracketSelectors, + final IGrammarRepository grammarRepository, + final IThemeProvider themeProvider) { + + this.rootScopeName = rootScopeName; this.scopeMetadataProvider = new ScopeMetadataProvider(initialLanguage, themeProvider, embeddedLanguages); - this.balancedBracketSelectors = balancedBracketSelectors; this.grammarRepository = grammarRepository; this.grammar = initGrammar(grammar, null); + this.balancedBracketSelectors = balancedBracketSelectors; if (tokenTypes != null) { for (final var entry : tokenTypes.entrySet()) { final var selector = entry.getKey(); - final var type = entry.getValue().intValue(); + final var type = entry.getValue(); for (final var matcher : Matcher.createMatchers(selector)) { tokenTypeMatchers.add(new TokenTypeMatcher(matcher.matcher, type)); } @@ -109,12 +110,16 @@ ScopeMetadata getMetadataForScope(final String scope) { } private void collectInjections(final List result, final String selector, final IRawRule rule, - final IRuleFactoryHelper ruleFactoryHelper, final IRawGrammar grammar) { + final IRuleFactoryHelper ruleFactoryHelper, final IRawGrammar grammar) { final var matchers = Matcher.createMatchers(selector); final var ruleId = RuleFactory.getCompiledRuleId(rule, ruleFactoryHelper, this.grammar.getRepository()); - for (final var matcher : matchers) { - result.add(new Injection(selector, matcher.matcher, ruleId, grammar, matcher.priority)); + result.add(new Injection( + selector, + matcher.matcher, + ruleId, + grammar, + matcher.priority)); } } @@ -122,7 +127,7 @@ private List collectInjections() { final var grammarRepository = new IGrammarRepository() { @Override public @Nullable IRawGrammar lookup(final String scopeName) { - if (Objects.equals(scopeName, Grammar.this.scopeName)) { + if (Objects.equals(scopeName, Grammar.this.rootScopeName)) { return Grammar.this.grammar; } return getExternalGrammar(scopeName, null); @@ -134,7 +139,7 @@ private List collectInjections() { } }; - final var dependencyProcessor = new ScopeDependencyProcessor(grammarRepository, this.scopeName); + final var dependencyProcessor = new ScopeDependencyProcessor(grammarRepository, this.rootScopeName); // TODO: uncomment below to visit all scopes // while (dependencyProcessor.queue.length > 0) { // dependencyProcessor.processQueue(); @@ -152,7 +157,12 @@ private List collectInjections() { final var rawInjections = grammar.getInjections(); if (rawInjections != null) { for (final var e : rawInjections.entrySet()) { - collectInjections(result, e.getKey(), e.getValue(), this, grammar); + collectInjections( + result, + e.getKey(), + e.getValue(), + this, + grammar); } } @@ -164,8 +174,12 @@ private List collectInjections() { if (injectionGrammar != null) { final var selector = injectionGrammar.getInjectionSelector(); if (selector != null) { - collectInjections(result, selector, injectionGrammar.toRawRule(), this, - injectionGrammar); + collectInjections( + result, + selector, + injectionGrammar.toRawRule(), + this, + injectionGrammar); } } }); @@ -184,7 +198,7 @@ List getInjections() { if (LOGGER.isLoggable(Level.TRACE) && !injections.isEmpty()) { LOGGER.log(Level.TRACE, - "Grammar " + scopeName + " contains the following injections:"); + "Grammar " + rootScopeName + " contains the following injections:"); for (final var injection : injections) { LOGGER.log(Level.TRACE, " - " + injection.debugSelector); } @@ -206,7 +220,7 @@ public Rule getRule(final RuleId ruleId) { final var rule = this.ruleId2desc.get(ruleId); if (rule == null) { throw new IndexOutOfBoundsException( - "No rule with index " + ruleId.id + " found. Possible values: 0.." + this.ruleId2desc.size()); + "No rule with index " + ruleId.id + " found. Possible values: 0.." + this.ruleId2desc.size()); } return rule; } @@ -220,8 +234,9 @@ public IRawGrammar getExternalGrammar(final String scopeName, @Nullable final IR final IRawGrammar rawIncludedGrammar = this.grammarRepository.lookup(scopeName); if (rawIncludedGrammar != null) { - this.includedGrammars.put(scopeName, - initGrammar(rawIncludedGrammar, repository != null ? repository.getBase() : null)); + this.includedGrammars.put(scopeName, initGrammar( + rawIncludedGrammar, + repository != null ? repository.getBase() : null)); return this.includedGrammars.get(scopeName); } return null; @@ -230,13 +245,10 @@ public IRawGrammar getExternalGrammar(final String scopeName, @Nullable final IR private IRawGrammar initGrammar(IRawGrammar grammar, @Nullable final IRawRule base) { grammar = grammar.deepClone(); - final IRawRepository repo; - if (grammar.isRepositorySet()) { - repo = grammar.getRepository(); - } else { - repo = new RawRepository(); - grammar.setRepository(repo); - } + final var repo = grammar.isRepositorySet() + ? grammar.getRepository() + : new RawRepository(); + grammar.setRepository(repo); repo.setSelf(new RawRule() .setName(grammar.getScopeName()) @@ -252,7 +264,7 @@ public ITokenizeLineResult tokenizeLine(final String lineText) { @Override public ITokenizeLineResult tokenizeLine(final String lineText, @Nullable final IStackElement prevState) { - return tokenize(lineText, (StackElement) prevState, false); + return _tokenize(lineText, (StackElement) prevState, false); } @Override @@ -262,15 +274,20 @@ public ITokenizeLineResult2 tokenizeLine2(final String lineText) { @Override public ITokenizeLineResult2 tokenizeLine2(final String lineText, @Nullable final IStackElement prevState) { - return tokenize(lineText, (StackElement) prevState, true); + return _tokenize(lineText, (StackElement) prevState, true); } @SuppressWarnings("unchecked") - private T tokenize(String lineText, @Nullable StackElement prevState, final boolean emitBinaryTokens) { + private T _tokenize( + String lineText, + @Nullable StackElement prevState, + final boolean emitBinaryTokens) { var rootId = this.rootId; if (rootId == null) { - rootId = this.rootId = RuleFactory.getCompiledRuleId(this.grammar.getRepository().getSelf(), this, - this.grammar.getRepository()); + rootId = this.rootId = RuleFactory.getCompiledRuleId( + this.grammar.getRepository().getSelf(), + this, + this.grammar.getRepository()); } boolean isFirstLine; @@ -279,19 +296,36 @@ private T tokenize(String lineText, @Nullable StackElement prevState, final final var rawDefaultMetadata = this.scopeMetadataProvider.getDefaultMetadata(); final var themeData = rawDefaultMetadata.themeData; final var defaultTheme = themeData == null ? null : themeData.get(0); - final int defaultMetadata = StackElementMetadata.set(0, rawDefaultMetadata.languageId, - rawDefaultMetadata.tokenType, null, defaultTheme.fontStyle, defaultTheme.foreground, - defaultTheme.background); + final int defaultMetadata = StackElementMetadata.set( + 0, + rawDefaultMetadata.languageId, + rawDefaultMetadata.tokenType, + null, + defaultTheme.fontStyle, + defaultTheme.foreground, + defaultTheme.background); + + final var rootScopeName = this.getRule(rootId).getName(null, null); - final var rootRule = this.getRule(rootId); - final var rootScopeName = rootRule.getName(null, null); final var rawRootMetadata = this.scopeMetadataProvider.getMetadataForScope(rootScopeName); final int rootMetadata = ScopeListElement.mergeMetadata(defaultMetadata, null, rawRootMetadata); - final var scopeList = new ScopeListElement(null, - rootScopeName == null ? "unknown" : rootScopeName, rootMetadata); - - prevState = new StackElement(null, rootId, -1, -1, false, null, scopeList, scopeList); + final var scopeList = new ScopeListElement( + null, + rootScopeName == null + ? "unknown" + : rootScopeName, + rootMetadata); + + prevState = new StackElement( + null, + rootId, + -1, + -1, + false, + null, + scopeList, + scopeList); } else { isFirstLine = false; prevState.reset(); @@ -303,9 +337,19 @@ private T tokenize(String lineText, @Nullable StackElement prevState, final } final var onigLineText = OnigString.of(lineText); final int lineLength = lineText.length(); - final var lineTokens = new LineTokens(emitBinaryTokens, lineText, tokenTypeMatchers, balancedBracketSelectors); - final var nextState = LineTokenizer.tokenizeString(this, onigLineText, isFirstLine, 0, prevState, lineTokens, - true); + final var lineTokens = new LineTokens( + emitBinaryTokens, + lineText, + tokenTypeMatchers, + balancedBracketSelectors); + final var nextState = LineTokenizer.tokenizeString( + this, + onigLineText, + isFirstLine, + 0, + prevState, + lineTokens, + true); if (emitBinaryTokens) { return (T) new TokenizeLineResult2(lineTokens.getBinaryResult(nextState, lineLength), nextState); @@ -321,7 +365,7 @@ public String getName() { @Override public String getScopeName() { - return scopeName; + return rootScopeName; } @Override From 10643cfb3031250d6fb1cda24d198c308f8b7a50 Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 16 May 2022 17:52:59 +0200 Subject: [PATCH 20/41] Refactor RuleFactory according upstream project --- .../tm4e/core/internal/rule/RuleFactory.java | 105 +++++++++--------- 1 file changed, 52 insertions(+), 53 deletions(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java index a7d2ed7db..ac426a09e 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java @@ -29,7 +29,6 @@ import org.eclipse.tm4e.core.internal.grammar.RawRepository; import org.eclipse.tm4e.core.internal.grammar.RawRule; import org.eclipse.tm4e.core.internal.types.IRawCaptures; -import org.eclipse.tm4e.core.internal.types.IRawGrammar; import org.eclipse.tm4e.core.internal.types.IRawRepository; import org.eclipse.tm4e.core.internal.types.IRawRule; @@ -43,72 +42,71 @@ public final class RuleFactory { private static final Logger LOGGER = System.getLogger(RuleFactory.class.getName()); private static CaptureRule createCaptureRule(final IRuleFactoryHelper helper, @Nullable final String name, - @Nullable final String contentName, final RuleId retokenizeCapturedWithRuleId) { - return helper - .registerRule(id -> new CaptureRule(id, name, contentName, retokenizeCapturedWithRuleId)); + @Nullable final String contentName, final RuleId retokenizeCapturedWithRuleId) { + return helper.registerRule(id -> new CaptureRule(id, name, contentName, retokenizeCapturedWithRuleId)); } public static RuleId getCompiledRuleId(final IRawRule desc, final IRuleFactoryHelper helper, - final IRawRepository repository) { + final IRawRepository repository) { if (desc.getId() == null) { helper.registerRule(ruleId -> { desc.setId(ruleId); final var ruleMatch = desc.getMatch(); if (ruleMatch != null) { - return new MatchRule(ruleId, desc.getName(), ruleMatch, - compileCaptures(desc.getCaptures(), helper, repository)); + return new MatchRule( + ruleId, + desc.getName(), + ruleMatch, + _compileCaptures(desc.getCaptures(), helper, repository)); } final var begin = desc.getBegin(); if (begin == null) { final var repository1 = desc.getRepository() == null - ? repository - : IRawRepository.merge(repository, desc.getRepository()); + ? repository + : IRawRepository.merge(repository, desc.getRepository()); var patterns = desc.getPatterns(); if (patterns == null && desc.getInclude() != null) { patterns = List.of(new RawRule().setInclude(desc.getInclude())); } return new IncludeOnlyRule( - /* desc.$vscodeTextmateLocation, */ - ruleId, - desc.getName(), - desc.getContentName(), - compilePatterns(patterns, helper, repository1)); + ruleId, + desc.getName(), + desc.getContentName(), + _compilePatterns(patterns, helper, repository1)); } final String ruleWhile = desc.getWhile(); if (ruleWhile != null) { return new BeginWhileRule( - /* desc.$vscodeTextmateLocation, */ - ruleId, - desc.getName(), - desc.getContentName(), - begin, compileCaptures(defaultIfNull(desc.getBeginCaptures(), desc.getCaptures()), helper, - repository), - ruleWhile, compileCaptures(defaultIfNull(desc.getWhileCaptures(), desc.getCaptures()), - helper, repository), - compilePatterns(desc.getPatterns(), helper, repository)); - } - - return new BeginEndRule( - /* desc.$vscodeTextmateLocation, */ ruleId, desc.getName(), desc.getContentName(), - begin, compileCaptures(defaultIfNull(desc.getBeginCaptures(), desc.getCaptures()), helper, - repository), - desc.getEnd(), compileCaptures(defaultIfNull(desc.getEndCaptures(), desc.getCaptures()), - helper, repository), - desc.isApplyEndPatternLast(), - compilePatterns(desc.getPatterns(), helper, repository)); + begin, _compileCaptures(defaultIfNull(desc.getBeginCaptures(), desc.getCaptures()), helper, + repository), + ruleWhile, _compileCaptures(defaultIfNull(desc.getWhileCaptures(), desc.getCaptures()), helper, + repository), + _compilePatterns(desc.getPatterns(), helper, repository)); + } + + return new BeginEndRule( + ruleId, + desc.getName(), + desc.getContentName(), + begin, _compileCaptures(defaultIfNull(desc.getBeginCaptures(), desc.getCaptures()), helper, + repository), + desc.getEnd(), _compileCaptures(defaultIfNull(desc.getEndCaptures(), desc.getCaptures()), helper, + repository), + desc.isApplyEndPatternLast(), + _compilePatterns(desc.getPatterns(), helper, repository)); }); } return castNonNull(desc.getId()); } - private static List<@Nullable CaptureRule> compileCaptures(@Nullable final IRawCaptures captures, - final IRuleFactoryHelper helper, final IRawRepository repository) { + private static List<@Nullable CaptureRule> _compileCaptures(@Nullable final IRawCaptures captures, + final IRuleFactoryHelper helper, final IRawRepository repository) { if (captures == null) { return Collections.emptyList(); } @@ -133,10 +131,10 @@ begin, compileCaptures(defaultIfNull(desc.getBeginCaptures(), desc.getCaptures() final int numericCaptureId = parseInt(captureId, 10); final IRawRule rule = captures.getCapture(captureId); final RuleId retokenizeCapturedWithRuleId = rule.getPatterns() == null - ? RuleId.NO_RULE - : getCompiledRuleId(captures.getCapture(captureId), helper, repository); + ? RuleId.NO_RULE + : getCompiledRuleId(captures.getCapture(captureId), helper, repository); r.set(numericCaptureId, createCaptureRule(helper, rule.getName(), rule.getContentName(), - retokenizeCapturedWithRuleId)); + retokenizeCapturedWithRuleId)); } return r; } @@ -149,8 +147,8 @@ private static int parseInt(final String string, final int base) { } } - private static CompilePatternsResult compilePatterns(@Nullable final Collection patterns, - final IRuleFactoryHelper helper, final IRawRepository repository) { + private static CompilePatternsResult _compilePatterns(@Nullable final Collection patterns, + final IRuleFactoryHelper helper, final IRawRepository repository) { if (patterns == null) { return new CompilePatternsResult(new RuleId[0], false); } @@ -165,8 +163,8 @@ private static CompilePatternsResult compilePatterns(@Nullable final Collection< final IRawRule localIncludedRule = repository.getRule(patternInclude.substring(1)); if (localIncludedRule != null) { ruleId = getCompiledRuleId(localIncludedRule, helper, repository); - } else if (LOGGER.isLoggable(DEBUG)) { - LOGGER.log(DEBUG, "CANNOT find rule for scopeName: %s, I am: %s", + } else { + LOGGER.log(WARNING, "CANNOT find rule for scopeName [{0}]. I am [{1}]", patternInclude, repository.getBase().getName()); } } else if (patternInclude.equals(RawRepository.DOLLAR_BASE)) { @@ -188,23 +186,24 @@ private static CompilePatternsResult compilePatterns(@Nullable final Collection< } // External include - final IRawGrammar externalGrammar = helper.getExternalGrammar(externalGrammarName, repository); + final var externalGrammar = helper.getExternalGrammar(externalGrammarName, repository); + if (externalGrammar != null) { final var externalGrammarRepo = externalGrammar.getRepository(); if (externalGrammarInclude != null) { - final IRawRule externalIncludedRule = externalGrammarRepo.getRule(externalGrammarInclude); + final var externalIncludedRule = externalGrammarRepo.getRule(externalGrammarInclude); if (externalIncludedRule != null) { ruleId = getCompiledRuleId(externalIncludedRule, helper, externalGrammarRepo); - } else if (LOGGER.isLoggable(DEBUG)) { - LOGGER.log(DEBUG, "CANNOT find rule for scopeName: %s, I am: %s", - patternInclude, repository.getBase().getName()); + } else { + LOGGER.log(WARNING, "CANNOT find rule for scopeName [{0}]. I am [{1}]", + patternInclude, repository.getBase().getName()); } } else { ruleId = getCompiledRuleId(externalGrammarRepo.getSelf(), helper, externalGrammarRepo); } - } else if (LOGGER.isLoggable(DEBUG)) { - LOGGER.log(DEBUG, "CANNOT find grammar for scopeName: %s, I am: %s", - patternInclude, repository.getBase().getName()); + } else { + LOGGER.log(WARNING, "CANNOT find grammar for scopeName [{0}]. I am [{1}]", + patternInclude, repository.getBase().getName()); } } } else { @@ -241,7 +240,7 @@ private static CompilePatternsResult compilePatterns(@Nullable final Collection< } if (skipRule) { - LOGGER.log(DEBUG, "REMOVING RULE ENTIRELY DUE TO EMPTY PATTERNS THAT ARE MISSING"); + LOGGER.log(WARNING, "REMOVING RULE ENTIRELY DUE TO EMPTY PATTERNS THAT ARE MISSING"); continue; } @@ -250,8 +249,8 @@ private static CompilePatternsResult compilePatterns(@Nullable final Collection< } return new CompilePatternsResult( - r.toArray(RuleId[]::new), - patterns.size() != r.size()); + r.toArray(RuleId[]::new), + patterns.size() != r.size()); } private RuleFactory() { From 998268e8c1f3465e96405e66320648d1b2f66b9d Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 16 May 2022 18:08:39 +0200 Subject: [PATCH 21/41] Refactor Rule#collectPatternsRecursive to Rule#collectPatterns --- .../tm4e/core/internal/rule/BeginEndRule.java | 35 ++++++++++--------- .../core/internal/rule/BeginWhileRule.java | 29 +++++++-------- .../tm4e/core/internal/rule/CaptureRule.java | 3 +- .../core/internal/rule/IncludeOnlyRule.java | 7 ++-- .../tm4e/core/internal/rule/MatchRule.java | 5 ++- .../eclipse/tm4e/core/internal/rule/Rule.java | 2 +- 6 files changed, 38 insertions(+), 43 deletions(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginEndRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginEndRule.java index bdf89e98e..50e43d03c 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginEndRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginEndRule.java @@ -45,9 +45,9 @@ public final class BeginEndRule extends Rule { private RegExpSourceList cachedCompiledPatterns; BeginEndRule(final RuleId id, @Nullable final String name, @Nullable final String contentName, final String begin, - final List<@Nullable CaptureRule> beginCaptures, @Nullable final String end, - final List<@Nullable CaptureRule> endCaptures, final boolean applyEndPatternLast, - final CompilePatternsResult patterns) { + final List<@Nullable CaptureRule> beginCaptures, @Nullable final String end, + final List<@Nullable CaptureRule> endCaptures, final boolean applyEndPatternLast, + final CompilePatternsResult patterns) { super(id, name, contentName); this.begin = new RegExpSource(begin, this.id); this.beginCaptures = beginCaptures; @@ -59,21 +59,21 @@ public final class BeginEndRule extends Rule { this.hasMissingPatterns = patterns.hasMissingPatterns; } + public String debugBeginRegExp() { + return this.begin.getSource(); + } + + public String debugEndRegExp() { + return this.end.getSource(); + } + public String getEndWithResolvedBackReferences(final String lineText, final OnigCaptureIndex[] captureIndices) { return this.end.resolveBackReferences(lineText, captureIndices); } @Override - public void collectPatternsRecursive(final IRuleRegistry grammar, final RegExpSourceList out, - final boolean isFirst) { - if (isFirst) { - for (final RuleId pattern : this.patterns) { - final Rule rule = grammar.getRule(pattern); - rule.collectPatternsRecursive(grammar, out, false); - } - } else { - out.add(this.begin); - } + public void collectPatterns(final IRuleRegistry grammar, final RegExpSourceList out) { + out.add(this.begin); } @Override @@ -83,17 +83,20 @@ public CompiledRule compile(final IRuleRegistry grammar, @Nullable final String @Override public CompiledRule compileAG(final IRuleRegistry grammar, @Nullable final String endRegexSource, - final boolean allowA, final boolean allowG) { + final boolean allowA, final boolean allowG) { return getCachedCompiledPatterns(grammar, endRegexSource).compileAG(allowA, allowG); } private RegExpSourceList getCachedCompiledPatterns(final IRuleRegistry grammar, - @Nullable final String endRegexSource) { + @Nullable final String endRegexSource) { var cachedCompiledPatterns = this.cachedCompiledPatterns; if (cachedCompiledPatterns == null) { cachedCompiledPatterns = new RegExpSourceList(); - collectPatternsRecursive(grammar, cachedCompiledPatterns, true); + for (final var pattern : this.patterns) { + final var rule = grammar.getRule(pattern); + rule.collectPatterns(grammar, cachedCompiledPatterns); + } if (this.applyEndPatternLast) { cachedCompiledPatterns.add(this.endHasBackReferences ? this.end.clone() : this.end); diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginWhileRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginWhileRule.java index acf4935c9..bfdce7f35 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginWhileRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginWhileRule.java @@ -45,8 +45,8 @@ public final class BeginWhileRule extends Rule { private RegExpSourceList cachedCompiledWhilePatterns; BeginWhileRule(final RuleId id, @Nullable final String name, @Nullable final String contentName, final String begin, - final List<@Nullable CaptureRule> beginCaptures, final String _while, - final List<@Nullable CaptureRule> whileCaptures, final CompilePatternsResult patterns) { + final List<@Nullable CaptureRule> beginCaptures, final String _while, + final List<@Nullable CaptureRule> whileCaptures, final CompilePatternsResult patterns) { super(/* $location, */id, name, contentName); this.begin = new RegExpSource(begin, this.id); this.beginCaptures = beginCaptures; @@ -62,17 +62,8 @@ public String getWhileWithResolvedBackReferences(final String lineText, final On } @Override - public void collectPatternsRecursive(final IRuleRegistry grammar, final RegExpSourceList out, - final boolean isFirst) { - if (isFirst) { - Rule rule; - for (final RuleId pattern : patterns) { - rule = grammar.getRule(pattern); - rule.collectPatternsRecursive(grammar, out, false); - } - } else { - out.add(this.begin); - } + public void collectPatterns(final IRuleRegistry grammar, final RegExpSourceList out) { + out.add(this.begin); } @Override @@ -82,8 +73,8 @@ public CompiledRule compile(final IRuleRegistry grammar, @Nullable final String @Override public CompiledRule compileAG(final IRuleRegistry grammar, @Nullable final String endRegexSource, - final boolean allowA, - final boolean allowG) { + final boolean allowA, + final boolean allowG) { return getCachedCompiledPatterns(grammar).compileAG(allowA, allowG); } @@ -91,8 +82,12 @@ private RegExpSourceList getCachedCompiledPatterns(final IRuleRegistry grammar) var cachedCompiledPatterns = this.cachedCompiledPatterns; if (cachedCompiledPatterns == null) { cachedCompiledPatterns = new RegExpSourceList(); - collectPatternsRecursive(grammar, cachedCompiledPatterns, true); this.cachedCompiledPatterns = cachedCompiledPatterns; + + for (final var pattern : this.patterns) { + final var rule = grammar.getRule(pattern); + rule.collectPatterns(grammar, cachedCompiledPatterns); + } } return cachedCompiledPatterns; } @@ -102,7 +97,7 @@ public CompiledRule compileWhile(@Nullable final String endRegexSource) { } public CompiledRule compileWhileAG(@Nullable final String endRegexSource, final boolean allowA, - final boolean allowG) { + final boolean allowG) { return getCachedCompiledWhilePatterns(endRegexSource).compileAG(allowA, allowG); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CaptureRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CaptureRule.java index e1b3cc46a..43e1ff05b 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CaptureRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CaptureRule.java @@ -34,8 +34,7 @@ public final class CaptureRule extends Rule { } @Override - public void collectPatternsRecursive(final IRuleRegistry grammar, final RegExpSourceList out, - final boolean isFirst) { + public void collectPatterns(final IRuleRegistry grammar, final RegExpSourceList out) { throw new UnsupportedOperationException(); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IncludeOnlyRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IncludeOnlyRule.java index 33b98d2ff..856188cc8 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IncludeOnlyRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IncludeOnlyRule.java @@ -39,11 +39,10 @@ final class IncludeOnlyRule extends Rule { } @Override - public void collectPatternsRecursive(final IRuleRegistry grammar, final RegExpSourceList out, - final boolean isFirst) { + public void collectPatterns(final IRuleRegistry grammar, final RegExpSourceList out) { for (final RuleId pattern : this.patterns) { final Rule rule = grammar.getRule(pattern); - rule.collectPatternsRecursive(grammar, out, false); + rule.collectPatterns(grammar, out); } } @@ -63,7 +62,7 @@ private RegExpSourceList getCachedCompiledPatterns(final IRuleRegistry grammar) var cachedCompiledPatterns = this.cachedCompiledPatterns; if (cachedCompiledPatterns == null) { cachedCompiledPatterns = new RegExpSourceList(); - this.collectPatternsRecursive(grammar, cachedCompiledPatterns, true); + this.collectPatterns(grammar, cachedCompiledPatterns); this.cachedCompiledPatterns = cachedCompiledPatterns; } return cachedCompiledPatterns; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/MatchRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/MatchRule.java index 9fd051e73..9ec77e7f6 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/MatchRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/MatchRule.java @@ -41,8 +41,7 @@ public final class MatchRule extends Rule { } @Override - public void collectPatternsRecursive(final IRuleRegistry grammar, final RegExpSourceList out, - final boolean isFirst) { + public void collectPatterns(final IRuleRegistry grammar, final RegExpSourceList out) { out.add(this.match); } @@ -61,7 +60,7 @@ private RegExpSourceList getCachedCompiledPatterns(final IRuleRegistry grammar) var cachedCompiledPatterns = this.cachedCompiledPatterns; if (cachedCompiledPatterns == null) { cachedCompiledPatterns = new RegExpSourceList(); - this.collectPatternsRecursive(grammar, cachedCompiledPatterns, true); + this.collectPatterns(grammar, cachedCompiledPatterns); this.cachedCompiledPatterns = cachedCompiledPatterns; } return cachedCompiledPatterns; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/Rule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/Rule.java index 7a0fd9a81..acd60fb66 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/Rule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/Rule.java @@ -63,7 +63,7 @@ public String getContentName(final String lineText, final OnigCaptureIndex[] cap return RegexSource.replaceCaptures(contentName, lineText, captureIndices); } - public abstract void collectPatternsRecursive(IRuleRegistry grammar, RegExpSourceList out, boolean isFirst); + public abstract void collectPatterns(IRuleRegistry grammar, RegExpSourceList out); public abstract CompiledRule compile(IRuleRegistry grammar, @Nullable String endRegexSource); From b0366c39b78068e3400072bf1e520f823467e23c Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 16 May 2022 19:04:06 +0200 Subject: [PATCH 22/41] Use Strings.isNullOrEmpty --- org.eclipse.tm4e.registry/META-INF/MANIFEST.MF | 1 + .../main/java/org/eclipse/tm4e/registry/TMResource.java | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/org.eclipse.tm4e.registry/META-INF/MANIFEST.MF b/org.eclipse.tm4e.registry/META-INF/MANIFEST.MF index 736f241b7..c57bef45d 100644 --- a/org.eclipse.tm4e.registry/META-INF/MANIFEST.MF +++ b/org.eclipse.tm4e.registry/META-INF/MANIFEST.MF @@ -8,6 +8,7 @@ Bundle-RequiredExecutionEnvironment: JavaSE-17 Require-Bundle: org.eclipse.tm4e.core;bundle-version="0.4.4", org.eclipse.core.runtime, com.google.gson;bundle-version="2.9.0", + com.google.guava;bundle-version="30.1.0", org.eclipse.equinox.preferences Export-Package: org.eclipse.tm4e.registry Bundle-Activator: org.eclipse.tm4e.registry.TMEclipseRegistryPlugin diff --git a/org.eclipse.tm4e.registry/src/main/java/org/eclipse/tm4e/registry/TMResource.java b/org.eclipse.tm4e.registry/src/main/java/org/eclipse/tm4e/registry/TMResource.java index 83eed2c0a..cba28c02c 100644 --- a/org.eclipse.tm4e.registry/src/main/java/org/eclipse/tm4e/registry/TMResource.java +++ b/org.eclipse.tm4e.registry/src/main/java/org/eclipse/tm4e/registry/TMResource.java @@ -21,6 +21,8 @@ import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.jdt.annotation.Nullable; +import com.google.common.base.Strings; + /** * TextMate Resource. */ @@ -38,7 +40,6 @@ public class TMResource implements ITMResource { * Constructor for user preferences (loaded from Json with Gson). */ public TMResource() { - } /** @@ -55,7 +56,7 @@ public TMResource(final IConfigurationElement ce) { this.pluginId = ce.getNamespaceIdentifier(); } - public TMResource(@Nullable final String path, @Nullable final String pluginId) { + public TMResource(final String path, @Nullable final String pluginId) { this.path = path; this.pluginId = pluginId; } @@ -75,10 +76,10 @@ public String getPluginId() { @Nullable @Override public InputStream getInputStream() throws IOException { - if (path == null || "".equals(path)) { + if (Strings.isNullOrEmpty(path)) { return null; } - if (pluginId != null) { + if (!Strings.isNullOrEmpty(path)) { final URL url = new URL(PLATFORM_PLUGIN + pluginId + "/" + path); return url.openStream(); } From 47a729e5b5034c608c9119a2220ae3c2cf1fccbd Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 16 May 2022 20:49:27 +0200 Subject: [PATCH 23/41] Configure Java 17 as target --- org.eclipse.tm4e.samples/.classpath | 34 +++++++++++++++++-- .../.settings/org.eclipse.jdt.core.prefs | 6 ++-- org.eclipse.tm4e.samples/META-INF/MANIFEST.MF | 2 +- 3 files changed, 35 insertions(+), 7 deletions(-) diff --git a/org.eclipse.tm4e.samples/.classpath b/org.eclipse.tm4e.samples/.classpath index 0bf6f096c..9165cb465 100644 --- a/org.eclipse.tm4e.samples/.classpath +++ b/org.eclipse.tm4e.samples/.classpath @@ -1,12 +1,40 @@ - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.tm4e.samples/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.tm4e.samples/.settings/org.eclipse.jdt.core.prefs index f648802b5..75d30254f 100644 --- a/org.eclipse.tm4e.samples/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.tm4e.samples/.settings/org.eclipse.jdt.core.prefs @@ -11,9 +11,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -129,7 +129,7 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false diff --git a/org.eclipse.tm4e.samples/META-INF/MANIFEST.MF b/org.eclipse.tm4e.samples/META-INF/MANIFEST.MF index 3b7ab4bae..4a8d783c4 100644 --- a/org.eclipse.tm4e.samples/META-INF/MANIFEST.MF +++ b/org.eclipse.tm4e.samples/META-INF/MANIFEST.MF @@ -12,7 +12,7 @@ Require-Bundle: org.eclipse.jface.text, org.eclipse.tm4e.core, org.eclipse.tm4e.ui, org.eclipse.ui.genericeditor;bundle-version="1.0.0";resolution:=optional -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-ActivationPolicy: lazy Automatic-Module-Name: org.eclipse.tm4e.samples From 352062921ad5e2945f95d427a94b05f579275316 Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 16 May 2022 20:49:37 +0200 Subject: [PATCH 24/41] Adapt Registry/ScopeDependencyProcessor changes from upstream --- .../core/grammar/internal/RawTestImpl.java | 35 +-- org.eclipse.tm4e.core/META-INF/MANIFEST.MF | 2 +- .../tm4e/core/internal/grammar/Grammar.java | 20 +- .../grammar/ScopeDependencyProcessor.java | 250 ----------------- .../dependencies/AbsoluteRuleReference.java | 57 ++++ .../dependencies/IncludeReference.java | 62 ++++ .../ScopeDependencyProcessor.java | 264 ++++++++++++++++++ .../grammar/dependencies/package-info.java | 4 + .../grammar/reader/GrammarReader.java | 12 +- .../core/internal/registry/SyncRegistry.java | 106 +------ .../tm4e/core/internal/rule/RuleFactory.java | 47 ++-- .../core/internal/utils/MoreCollections.java | 9 +- .../core/registry/IGrammarConfiguration.java | 46 +++ .../tm4e/core/registry/IGrammarSource.java | 52 ++++ .../tm4e/core/registry/IRegistryOptions.java | 35 +-- .../eclipse/tm4e/core/registry/Registry.java | 214 ++++++++------ .../org/eclipse/tm4e/core/TestGrammar.java | 8 +- .../tm4e/core/benchmark/GrammarBenchmark.java | 12 +- .../core/grammar/GrammarInjectionTest.java | 101 +++---- .../tm4e/core/grammar/GrammarTest.java | 83 +++--- .../tm4e/core/grammar/GrammarTest2.java | 99 ++++--- .../eclipse/tm4e/core/grammar/MarkDown.java | 27 +- .../internal/grammar/TokenizeLineTest.java | 30 ++ .../grammar/reader/GrammarReaderTest.java | 19 +- .../AbstractGrammarRegistryManager.java | 95 ++++--- .../angular2/Angular2ViewerConfiguration.java | 34 +-- .../typescript/JSXViewerConfiguration.java | 15 +- .../TypeScriptViewerConfiguration.java | 13 +- .../internal/model/DocumentTMModelTest.java | 3 +- ...MPresentationReconcilerTypeScriptTest.java | 52 ++-- .../wizards/SelectGrammarWizardPage.java | 11 +- 31 files changed, 990 insertions(+), 827 deletions(-) delete mode 100644 org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/ScopeDependencyProcessor.java create mode 100644 org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/AbsoluteRuleReference.java create mode 100644 org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/IncludeReference.java create mode 100644 org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/ScopeDependencyProcessor.java create mode 100644 org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/package-info.java create mode 100644 org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IGrammarConfiguration.java create mode 100644 org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IGrammarSource.java create mode 100644 org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineTest.java diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawTestImpl.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawTestImpl.java index ef58a0bbf..1a32c9ae6 100644 --- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawTestImpl.java +++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawTestImpl.java @@ -23,6 +23,7 @@ import org.eclipse.tm4e.core.grammar.IGrammar; import org.eclipse.tm4e.core.grammar.IStackElement; +import org.eclipse.tm4e.core.registry.IGrammarSource; import org.eclipse.tm4e.core.registry.IRegistryOptions; import org.eclipse.tm4e.core.registry.Registry; @@ -71,17 +72,6 @@ public List getLines() { public void executeTest() throws Exception { final var options = new IRegistryOptions() { - - @Override - public String getFilePath(final String scopeName) { - return null; - } - - @Override - public InputStream getInputStream(final String scopeName) throws IOException { - return null; - } - @Override public Collection getInjections(final String scopeName) { if (scopeName.equals(getGrammarScopeName())) { @@ -109,7 +99,8 @@ public Collection getInjections(final String scopeName) { private IGrammar getGrammar(final Registry registry, final File testLocation) throws Exception { IGrammar grammar = null; for (final String grammarPath : getGrammars()) { - final IGrammar tmpGrammar = registry.loadGrammarFromPathSync(new File(testLocation, grammarPath)); + final IGrammar tmpGrammar = registry + .addGrammar(IGrammarSource.fromFile(new File(testLocation, grammarPath).toPath())); if (grammarPath.equals(getGrammarPath())) { grammar = tmpGrammar; } @@ -118,17 +109,17 @@ private IGrammar getGrammar(final Registry registry, final File testLocation) th } private static IStackElement assertLineTokenization(final IGrammar grammar, final RawTestLine testCase, - final IStackElement prevState) { + final IStackElement prevState) { final var line = testCase.line; final var actual = grammar.tokenizeLine(line, prevState); final var actualTokens = Arrays.stream(actual.getTokens()) - .map(token -> new RawToken( - line.substring( - token.getStartIndex(), - Math.min(token.getEndIndex(), line.length())), // TODO Math.min not required in upstream why? - token.getScopes())) - .collect(toList()); + .map(token -> new RawToken( + line.substring( + token.getStartIndex(), + Math.min(token.getEndIndex(), line.length())), // TODO Math.min not required in upstream why? + token.getScopes())) + .collect(toList()); // TODO@Alex: fix tests instead of working around if (!line.isEmpty()) { @@ -142,7 +133,7 @@ private static IStackElement assertLineTokenization(final IGrammar grammar, fina } private static void deepEqual(final List actualTokens, final List expextedTokens, - final String message) { + final String message) { // compare collection size if (expextedTokens.size() != actualTokens.size()) { @@ -150,8 +141,8 @@ private static void deepEqual(final List actualTokens, final List result, final String select } } - private List collectInjections() { + private List _collectInjections() { final var grammarRepository = new IGrammarRepository() { @Override public @Nullable IRawGrammar lookup(final String scopeName) { @@ -139,20 +139,12 @@ private List collectInjections() { } }; - final var dependencyProcessor = new ScopeDependencyProcessor(grammarRepository, this.rootScopeName); - // TODO: uncomment below to visit all scopes - // while (dependencyProcessor.queue.length > 0) { - // dependencyProcessor.processQueue(); - // } - final var result = new ArrayList(); - dependencyProcessor.seenFullScopeRequests.forEach(scopeName -> { - final var grammar = grammarRepository.lookup(scopeName); - if (grammar == null) { - return; - } + final var scopeName = this.rootScopeName; + final var grammar = grammarRepository.lookup(scopeName); + if (grammar != null) { // add injections from the current grammar final var rawInjections = grammar.getInjections(); if (rawInjections != null) { @@ -184,7 +176,7 @@ private List collectInjections() { } }); } - }); + } Collections.sort(result, (i1, i2) -> i1.priority - i2.priority); // sort by priority @@ -194,7 +186,7 @@ private List collectInjections() { List getInjections() { var injections = this.injections; if (injections == null) { - injections = this.injections = this.collectInjections(); + injections = this.injections = this._collectInjections(); if (LOGGER.isLoggable(Level.TRACE) && !injections.isEmpty()) { LOGGER.log(Level.TRACE, diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/ScopeDependencyProcessor.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/ScopeDependencyProcessor.java deleted file mode 100644 index b0c4de389..000000000 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/ScopeDependencyProcessor.java +++ /dev/null @@ -1,250 +0,0 @@ -/** - * Copyright (c) 2022 Sebastian Thomschke and others. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Initial code from https://github.com/Microsoft/vscode-textmate/ - * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. - * Initial license: MIT - * - * Contributors: - * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license - * - Sebastian Thomschke - translation and adaptation to Java - */ -package org.eclipse.tm4e.core.internal.grammar; - -import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.eclipse.jdt.annotation.Nullable; -import org.eclipse.tm4e.core.TMException; -import org.eclipse.tm4e.core.internal.registry.IGrammarRepository; -import org.eclipse.tm4e.core.internal.types.IRawGrammar; -import org.eclipse.tm4e.core.internal.types.IRawRepository; -import org.eclipse.tm4e.core.internal.types.IRawRule; - -/** - * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/grammar.ts - */ -class ScopeDependencyProcessor { - - private abstract static class ScopeDependency { - final String scopeName; - - ScopeDependency(final String scopeName) { - this.scopeName = scopeName; - } - } - - private static final class FullScopeDependency extends ScopeDependency { - FullScopeDependency(final String scopeName) { - super(scopeName); - } - } - - private static final class PartialScopeDependency extends ScopeDependency { - final String include; - - PartialScopeDependency(final String scopeName, final String include) { - super(scopeName); - this.include = include; - } - - String toKey() { - return this.scopeName + '#' + this.include; - } - } - - private static class ScopeDependencyCollector { - - final List full = new ArrayList<>(); - final List partial = new ArrayList<>(); - - final Set visitedRule = new HashSet<>(); - private final Set seenFull = new HashSet<>(); - private final Set seenPartial = new HashSet<>(); - - void add(final ScopeDependency dep) { - if (dep instanceof final FullScopeDependency fdep) { - if (!this.seenFull.add(fdep.scopeName)) { - this.full.add(fdep); - } - } else if (dep instanceof final PartialScopeDependency pdep) { - if (!this.seenPartial.add(pdep.toKey())) { - this.partial.add(pdep); - } - } - } - } - - final Set seenFullScopeRequests = new HashSet<>(); - final Set seenPartialScopeRequests = new HashSet<>(); - List queue = new ArrayList<>(); - - public final IGrammarRepository repo; - public final String initialScopeName; - - ScopeDependencyProcessor(final IGrammarRepository repo, final String initialScopeName) { - this.repo = repo; - this.initialScopeName = initialScopeName; - this.seenFullScopeRequests.add(initialScopeName); - this.queue.add(new FullScopeDependency(initialScopeName)); - } - - public void processQueue() { - final var q = queue; - queue = new ArrayList<>(); - - final var deps = new ScopeDependencyCollector(); - for (final var dep : q) { - collectDependenciesForDep(this.repo, this.initialScopeName, deps, dep); - } - - for (final var dep : deps.full) { - if (this.seenFullScopeRequests.contains(dep.scopeName)) { - // already processed - continue; - } - this.seenFullScopeRequests.add(dep.scopeName); - this.queue.add(dep); - } - - for (final var dep : deps.partial) { - if (this.seenFullScopeRequests.contains(dep.scopeName)) { - // already processed in full - continue; - } - if (this.seenPartialScopeRequests.contains(dep.toKey())) { - // already processed - continue; - } - this.seenPartialScopeRequests.add(dep.toKey()); - this.queue.add(dep); - } - } - - void collectDependenciesForDep( - final IGrammarRepository repo, - final String initialScopeName, - final ScopeDependencyCollector result, - final ScopeDependency dep) { - final var grammar = repo.lookup(dep.scopeName); - if (grammar == null) { - if (dep.scopeName.equals(initialScopeName)) { - throw new TMException("No grammar provided for <" + initialScopeName + ">"); - } - return; - } - - final var initialGrammar = repo.lookup(initialScopeName); - if (dep instanceof final FullScopeDependency fdep) { - collectDependencies(result, castNonNull(initialGrammar), grammar); - } else if (dep instanceof final PartialScopeDependency pdep){ - collectSpecificDependencies(result, castNonNull(initialGrammar), grammar, pdep.include, null); - } - - final var injections = repo.injections(dep.scopeName); - if (injections != null) { - for (final var injection : injections) { - result.add(new FullScopeDependency(injection)); - } - } - } - - /** - * Collect a specific dependency from the grammar's repository - */ - void collectSpecificDependencies(final ScopeDependencyCollector result, final IRawGrammar baseGrammar, - final IRawGrammar selfGrammar, - final String include, @Nullable IRawRepository repository) { - if (repository == null && selfGrammar.isRepositorySet()) { - repository = selfGrammar.getRepository(); - } - if (repository != null) { - final var rule = repository.getRule(include); - if (rule != null) { - extractIncludedScopesInPatterns(result, baseGrammar, selfGrammar, List.of(rule), repository); - } - } - } - - /** - * Collects the list of all external included scopes in `grammar`. - */ - void collectDependencies(final ScopeDependencyCollector result, final IRawGrammar baseGrammar, - final IRawGrammar selfGrammar) { - final var patterns = selfGrammar.getPatterns(); - if (patterns != null) { - extractIncludedScopesInPatterns(result, baseGrammar, selfGrammar, patterns, selfGrammar.getRepository()); - } - final var injections = selfGrammar.getInjections(); - if (injections != null) { - extractIncludedScopesInPatterns(result, baseGrammar, selfGrammar, injections.values(), - selfGrammar.getRepository()); - } - } - - /** - * Fill in `result` all external included scopes in `patterns` - */ - void extractIncludedScopesInPatterns( - final ScopeDependencyCollector result, - final IRawGrammar baseGrammar, - final IRawGrammar selfGrammar, - final Collection patterns, - @Nullable final IRawRepository repository) { - for (final var pattern : patterns) { - if (result.visitedRule.contains(pattern)) { - continue; - } - result.visitedRule.add(pattern); - - final var patternRepository = pattern.getRepository() == null - ? repository - : IRawRepository.merge(repository, pattern.getRepository()); - final var patternPatterns = pattern.getPatterns(); - if (patternPatterns != null) { - extractIncludedScopesInPatterns(result, baseGrammar, selfGrammar, patternPatterns, patternRepository); - } - - final var include = pattern.getInclude(); - if (include == null) { - continue; - } - - if (include.equals(RawRepository.DOLLAR_BASE) || include.equals(baseGrammar.getScopeName())) { - collectDependencies(result, baseGrammar, baseGrammar); - } else if (include.equals(RawRepository.DOLLAR_SELF) || include.equals(selfGrammar.getScopeName())) { - collectDependencies(result, baseGrammar, selfGrammar); - } else if (include.charAt(0) == '#') { - collectSpecificDependencies(result, baseGrammar, selfGrammar, include.substring(1), patternRepository); - } else { - final var sharpIndex = include.indexOf('#'); - if (sharpIndex >= 0) { - final var scopeName = include.substring(0, sharpIndex); - final var includedName = include.substring(sharpIndex + 1); - if (scopeName.equals(baseGrammar.getScopeName())) { - collectSpecificDependencies(result, baseGrammar, baseGrammar, includedName, patternRepository); - } else if (scopeName.equals(selfGrammar.getScopeName())) { - collectSpecificDependencies(result, baseGrammar, selfGrammar, includedName, patternRepository); - } else { - result.add(new PartialScopeDependency(scopeName, include.substring(sharpIndex + 1))); - } - } else { - result.add(new FullScopeDependency(include)); - } - } - } - } -} diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/AbsoluteRuleReference.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/AbsoluteRuleReference.java new file mode 100644 index 000000000..ec2f575e2 --- /dev/null +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/AbsoluteRuleReference.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2022 Sebastian Thomschke and others. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. + * Initial license: MIT + * + * Contributors: + * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license + * - Sebastian Thomschke - translation and adaptation to Java + */ +package org.eclipse.tm4e.core.internal.grammar.dependencies; + +public abstract class AbsoluteRuleReference { + + /** + * References the top level rule of a grammar with the given scope name. + */ + static final class TopLevelRuleReference extends AbsoluteRuleReference { + TopLevelRuleReference(final String scopeName) { + super(scopeName); + } + } + + /** + * References a rule of a grammar in the top level repository section with the given name. + */ + static final class TopLevelRepositoryRuleReference extends AbsoluteRuleReference { + final String ruleName; + + TopLevelRepositoryRuleReference(final String scopeName, final String ruleName) { + super(scopeName); + this.ruleName = ruleName; + } + + @Override + String toKey() { + return this.scopeName + '#' + this.ruleName; + } + } + + public final String scopeName; + + private AbsoluteRuleReference(final String scopeName) { + this.scopeName = scopeName; + } + + String toKey() { + return this.scopeName; + } +} \ No newline at end of file diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/IncludeReference.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/IncludeReference.java new file mode 100644 index 000000000..de7401430 --- /dev/null +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/IncludeReference.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2022 Sebastian Thomschke and others. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. + * Initial license: MIT + * + * Contributors: + * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license + * - Sebastian Thomschke - translation and adaptation to Java + */ +package org.eclipse.tm4e.core.internal.grammar.dependencies; + +public class IncludeReference { + public enum Kind { + Base, + Self, + RelativeReference, + TopLevelReference, + TopLevelRepositoryReference + } + + public static final IncludeReference BASE = new IncludeReference(Kind.Base, "$base", ""); + public static final IncludeReference SELF = new IncludeReference(Kind.Base, "$self", ""); + + public static IncludeReference parseInclude(final String include) { + switch (include) { + case "$base": + return BASE; + case "$self": + return SELF; + default: + final var indexOfSharp = include.indexOf("#"); + switch (indexOfSharp) { + case -1: + return new IncludeReference(Kind.TopLevelReference, include, ""); + case 0: + return new IncludeReference(Kind.RelativeReference, "", include.substring(1)); + default: + final var scopeName = include.substring(0, indexOfSharp); + final var ruleName = include.substring(indexOfSharp + 1); + return new IncludeReference(Kind.TopLevelRepositoryReference, scopeName, ruleName); + } + } + } + + public final Kind kind; + public final String scopeName; + public final String ruleName; + + private IncludeReference(final Kind kind, final String scopeName, final String ruleName) { + this.kind = kind; + this.scopeName = scopeName; + this.ruleName = ruleName; + } +} diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/ScopeDependencyProcessor.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/ScopeDependencyProcessor.java new file mode 100644 index 000000000..a9c9cabcd --- /dev/null +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/ScopeDependencyProcessor.java @@ -0,0 +1,264 @@ +/** + * Copyright (c) 2022 Sebastian Thomschke and others. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. + * Initial license: MIT + * + * Contributors: + * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license + * - Sebastian Thomschke - translation and adaptation to Java + */ +package org.eclipse.tm4e.core.internal.grammar.dependencies; + +import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*; + +import java.util.ArrayDeque; +import java.util.Collection; +import java.util.Deque; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.tm4e.core.TMException; +import org.eclipse.tm4e.core.internal.grammar.dependencies.AbsoluteRuleReference.TopLevelRepositoryRuleReference; +import org.eclipse.tm4e.core.internal.grammar.dependencies.AbsoluteRuleReference.TopLevelRuleReference; +import org.eclipse.tm4e.core.internal.registry.IGrammarRepository; +import org.eclipse.tm4e.core.internal.types.IRawGrammar; +import org.eclipse.tm4e.core.internal.types.IRawRepository; +import org.eclipse.tm4e.core.internal.types.IRawRule; + +/** + * @see + * github.com/Microsoft/vscode-textmate/blob/master/src/grammar.ts + */ +public class ScopeDependencyProcessor { + + private static class ExternalReferenceCollector { + + final Deque references = new ArrayDeque<>(); + final Deque seenReferenceKeys = new ArrayDeque<>(); + + final Set visitedRule = new HashSet<>(); + + void add(final AbsoluteRuleReference reference) { + final var key = reference.toKey(); + if (this.seenReferenceKeys.contains(key)) { + return; + } + this.seenReferenceKeys.push(key); + this.references.push(reference); + } + } + + public final Set seenFullScopeRequests = new HashSet<>(); + final Set seenPartialScopeRequests = new HashSet<>(); + public Deque Q = new ArrayDeque<>(); + + public final IGrammarRepository repo; + public final String initialScopeName; + + public ScopeDependencyProcessor(final IGrammarRepository repo, final String initialScopeName) { + this.repo = repo; + this.initialScopeName = initialScopeName; + this.seenFullScopeRequests.add(initialScopeName); + this.Q.add(new TopLevelRuleReference(initialScopeName)); + } + + public void processQueue() { + final var q = Q; + Q = new ArrayDeque<>(); + + final var deps = new ExternalReferenceCollector(); + for (final var dep : q) { + collectReferencesOfReference(dep, this.initialScopeName, this.repo, deps); + } + + for (final var dep : deps.references) { + if (dep instanceof TopLevelRuleReference) { + if (this.seenFullScopeRequests.contains(dep.scopeName)) { + // already processed + continue; + } + this.seenFullScopeRequests.add(dep.scopeName); + this.Q.push(dep); + } else { + if (this.seenFullScopeRequests.contains(dep.scopeName)) { + // already processed in full + continue; + } + if (this.seenPartialScopeRequests.contains(dep.toKey())) { + // already processed + continue; + } + this.seenPartialScopeRequests.add(dep.toKey()); + this.Q.push(dep); + } + } + } + + void collectReferencesOfReference( + final AbsoluteRuleReference reference, + final String baseGrammarScopeName, + final IGrammarRepository repo, + final ExternalReferenceCollector result) { + + final var selfGrammar = repo.lookup(reference.scopeName); + if (selfGrammar == null) { + if (reference.scopeName.equals(baseGrammarScopeName)) { + throw new TMException("No grammar provided for <" + initialScopeName + ">"); + } + return; + } + + final var baseGrammar = castNonNull(repo.lookup(baseGrammarScopeName)); + + if (reference instanceof final TopLevelRuleReference ref) { + collectExternalReferencesInTopLevelRule(new Context(baseGrammar, selfGrammar), result); + } else if (reference instanceof final TopLevelRepositoryRuleReference ref) { + collectExternalReferencesInTopLevelRepositoryRule( + ref.ruleName, + new ContextWithRepository(baseGrammar, selfGrammar, selfGrammar.getRepository()), + result); + } + + final var injections = repo.injections(reference.scopeName); + if (injections != null) { + for (final var injection : injections) { + result.add(new TopLevelRuleReference(injection)); + } + } + } + + private static class Context { + final IRawGrammar baseGrammar; + final IRawGrammar selfGrammar; + + Context(final IRawGrammar baseGrammar, final IRawGrammar selfGrammar) { + this.baseGrammar = baseGrammar; + this.selfGrammar = selfGrammar; + } + } + + private static final class ContextWithRepository extends Context { + @Nullable + final IRawRepository repository; + + ContextWithRepository(final Context context, @Nullable final IRawRepository repository) { + super(context.baseGrammar, context.selfGrammar); + this.repository = repository; + } + + ContextWithRepository(final IRawGrammar baseGrammar, final IRawGrammar selfGrammar, + @Nullable final IRawRepository repository) { + super(baseGrammar, selfGrammar); + this.repository = repository; + } + } + + void collectExternalReferencesInTopLevelRepositoryRule(final String ruleName, + final ContextWithRepository context, + final ExternalReferenceCollector result) { + + if (context.repository != null) { + final var rule = context.repository.getRule(ruleName); + if (rule != null) { + collectExternalReferencesInRules(List.of(rule), context, result); + } + } + } + + void collectExternalReferencesInTopLevelRule(final Context context, final ExternalReferenceCollector result) { + final var patterns = context.selfGrammar.getPatterns(); + if (patterns != null) { + collectExternalReferencesInRules( + patterns, + new ContextWithRepository(context, context.selfGrammar.getRepository()), + result); + } + final var injections = context.selfGrammar.getInjections(); + if (injections != null) { + collectExternalReferencesInRules( + injections.values(), + new ContextWithRepository(context, context.selfGrammar.getRepository()), + result); + } + } + + void collectExternalReferencesInRules( + final Collection rules, + final ContextWithRepository context, + final ExternalReferenceCollector result) { + + for (final var rule : rules) { + if (result.visitedRule.contains(rule)) { + continue; + } + result.visitedRule.add(rule); + + final var patternRepository = rule.getRepository() == null + ? context.repository + : IRawRepository.merge(context.repository, rule.getRepository()); + + final var patternPatterns = rule.getPatterns(); + if (patternPatterns != null) { + collectExternalReferencesInRules(patternPatterns, new ContextWithRepository(context, patternRepository), + result); + } + + final var include = rule.getInclude(); + if (include == null) { + continue; + } + + final var reference = IncludeReference.parseInclude(include); + + switch (reference.kind) { + case Base: + collectExternalReferencesInTopLevelRule(new Context(context.baseGrammar, context.baseGrammar), result); + break; + case Self: + collectExternalReferencesInTopLevelRule(context, result); + break; + case RelativeReference: + collectExternalReferencesInTopLevelRepositoryRule(reference.ruleName, + new ContextWithRepository(context, patternRepository), + result); + break; + case TopLevelReference: + case TopLevelRepositoryReference: + @Nullable + final IRawGrammar selfGrammar = reference.scopeName.equals(context.selfGrammar.getScopeName()) + ? context.selfGrammar + : reference.scopeName.equals(context.baseGrammar.getScopeName()) + ? context.baseGrammar + : null; + + if (selfGrammar != null) { + final var newContext = new ContextWithRepository(context.baseGrammar, selfGrammar, + patternRepository); + if (reference.kind == IncludeReference.Kind.TopLevelRepositoryReference) { + collectExternalReferencesInTopLevelRepositoryRule(reference.ruleName, newContext, result); + } else { + collectExternalReferencesInTopLevelRule(newContext, result); + } + } else { + if (reference.kind == IncludeReference.Kind.TopLevelRepositoryReference) { + result.add(new TopLevelRepositoryRuleReference(reference.scopeName, reference.ruleName)); + } else { + result.add(new TopLevelRuleReference(reference.scopeName)); + } + } + break; + } + } + } +} diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/package-info.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/package-info.java new file mode 100644 index 000000000..b1cbd33e1 --- /dev/null +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/package-info.java @@ -0,0 +1,4 @@ +@NonNullByDefault +package org.eclipse.tm4e.core.internal.grammar.dependencies; + +import org.eclipse.jdt.annotation.NonNullByDefault; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/reader/GrammarReader.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/reader/GrammarReader.java index 18b1c86b0..a9cf5c967 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/reader/GrammarReader.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/reader/GrammarReader.java @@ -16,13 +16,10 @@ */ package org.eclipse.tm4e.core.internal.grammar.reader; -import java.io.InputStream; -import java.io.InputStreamReader; - -import org.eclipse.tm4e.core.internal.grammar.RawRule; import org.eclipse.tm4e.core.internal.grammar.RawCaptures; import org.eclipse.tm4e.core.internal.grammar.RawGrammar; import org.eclipse.tm4e.core.internal.grammar.RawRepository; +import org.eclipse.tm4e.core.internal.grammar.RawRule; import org.eclipse.tm4e.core.internal.parser.PListParser; import org.eclipse.tm4e.core.internal.parser.PListParserJSON; import org.eclipse.tm4e.core.internal.parser.PListParserXML; @@ -30,6 +27,7 @@ import org.eclipse.tm4e.core.internal.parser.PListPath; import org.eclipse.tm4e.core.internal.parser.PropertySettable; import org.eclipse.tm4e.core.internal.types.IRawGrammar; +import org.eclipse.tm4e.core.registry.IGrammarSource; /** * TextMate Grammar reader utilities. @@ -51,8 +49,10 @@ public final class GrammarReader { private static final PListParser XML_PARSER = new PListParserXML<>(OBJECT_FACTORY); private static final PListParser YAML_PARSER = new PListParserYAML<>(OBJECT_FACTORY); - public static IRawGrammar readGrammarSync(final String filePath, final InputStream in) throws Exception { - return getGrammarParser(filePath).parse(new InputStreamReader(in)); + public static IRawGrammar readGrammarSync(final IGrammarSource source) throws Exception { + try (var reader = source.getReader()) { + return getGrammarParser(source.getFilePath()).parse(reader); + } } private static PListParser getGrammarParser(final String filePath) { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java index 8f2305c5b..20b069396 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java @@ -16,9 +16,6 @@ */ package org.eclipse.tm4e.core.internal.registry; -import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*; - -import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; @@ -28,14 +25,10 @@ import org.eclipse.tm4e.core.grammar.IGrammar; import org.eclipse.tm4e.core.internal.grammar.BalancedBracketSelectors; import org.eclipse.tm4e.core.internal.grammar.Grammar; -import org.eclipse.tm4e.core.internal.grammar.RawRepository; -import org.eclipse.tm4e.core.internal.grammar.RawRule; import org.eclipse.tm4e.core.internal.theme.IThemeProvider; import org.eclipse.tm4e.core.internal.theme.Theme; import org.eclipse.tm4e.core.internal.theme.ThemeTrieElementRule; import org.eclipse.tm4e.core.internal.types.IRawGrammar; -import org.eclipse.tm4e.core.internal.types.IRawRepository; -import org.eclipse.tm4e.core.internal.types.IRawRule; /** * @see getColorMap() { /** * Add `grammar` to registry and return a list of referenced scope names - * - * TODO implementation differs from upstream */ - public Collection addGrammar(final IRawGrammar grammar, - @Nullable final Collection injectionScopeNames) { + public void addGrammar(final IRawGrammar grammar, + @Nullable final Collection injectionScopeNames) { this.rawGrammars.put(grammar.getScopeName(), grammar); - final Collection includedScopes = new ArrayList<>(); - collectIncludedScopes(includedScopes, grammar); if (injectionScopeNames != null) { this.injectionGrammars.put(grammar.getScopeName(), injectionScopeNames); - injectionScopeNames.forEach(scopeName -> addIncludedScope(scopeName, includedScopes)); } - return includedScopes; } @Override @@ -112,95 +99,20 @@ public List themeMatch(final String scopeName) { * Lookup a grammar. */ @Nullable - public IGrammar grammarForScopeName(final String scopeName, final int initialLanguage, - @Nullable final Map embeddedLanguages, - @Nullable final Map tokenTypes, - @Nullable final BalancedBracketSelectors balancedBracketSelectors) { + public IGrammar grammarForScopeName(final String scopeName, + final int initialLanguage, + @Nullable final Map embeddedLanguages, + @Nullable final Map tokenTypes, + @Nullable final BalancedBracketSelectors balancedBracketSelectors) { if (!this.grammars.containsKey(scopeName)) { final var rawGrammar = lookup(scopeName); if (rawGrammar == null) { return null; } this.grammars.put(scopeName, - new Grammar(scopeName, rawGrammar, initialLanguage, embeddedLanguages, tokenTypes, - balancedBracketSelectors, this, this)); + new Grammar(scopeName, rawGrammar, initialLanguage, embeddedLanguages, tokenTypes, + balancedBracketSelectors, this, this)); } return this.grammars.get(scopeName); } - - private static void collectIncludedScopes(final Collection result, final IRawGrammar grammar) { - final var grammarPatterns = grammar.getPatterns(); - if (grammarPatterns != null) { - extractIncludedScopesInPatterns(result, grammarPatterns); - } - - if (grammar.isRepositorySet()) { - final IRawRepository repository = grammar.getRepository(); - extractIncludedScopesInRepository(result, repository); - } - - // remove references to own scope (avoid recursion) - result.remove(grammar.getScopeName()); - } - - /** - * Fill in `result` all external included scopes in `patterns` - */ - private static void extractIncludedScopesInPatterns(final Collection result, - final Collection patterns) { - for (final IRawRule pattern : patterns) { - final Collection p = pattern.getPatterns(); - if (p != null) { - extractIncludedScopesInPatterns(result, p); - } - - final String include = pattern.getInclude(); - if (include == null) { - continue; - } - - if (include.equals(RawRepository.DOLLAR_BASE) || include.equals(RawRepository.DOLLAR_SELF)) { - // Special includes that can be resolved locally in this grammar - continue; - } - - if (include.charAt(0) == '#') { - // Local include from this grammar - continue; - } - - final int sharpIndex = include.indexOf('#'); - if (sharpIndex >= 0) { - addIncludedScope(include.substring(0, sharpIndex), result); - } else { - addIncludedScope(include, result); - } - } - } - - private static void addIncludedScope(final String scopeName, final Collection includedScopes) { - if (!includedScopes.contains(scopeName)) { - includedScopes.add(scopeName); - } - } - - /** - * Fill in `result` all external included scopes in `repository` - */ - private static void extractIncludedScopesInRepository(final Collection result, - final IRawRepository repository) { - if (repository instanceof final RawRule rawRepository) { - for (final var entry : rawRepository.values()) { - final IRawRule rule = (IRawRule) castNonNull(entry); - final var patterns = rule.getPatterns(); - if (patterns != null) { - extractIncludedScopesInPatterns(result, patterns); - } - final var repo = rule.getRepository(); - if (repo != null) { - extractIncludedScopesInRepository(result, repo); - } - } - } - } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java index ac426a09e..045ada115 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java @@ -26,8 +26,8 @@ import java.util.List; import org.eclipse.jdt.annotation.Nullable; -import org.eclipse.tm4e.core.internal.grammar.RawRepository; import org.eclipse.tm4e.core.internal.grammar.RawRule; +import org.eclipse.tm4e.core.internal.grammar.dependencies.IncludeReference; import org.eclipse.tm4e.core.internal.types.IRawCaptures; import org.eclipse.tm4e.core.internal.types.IRawRepository; import org.eclipse.tm4e.core.internal.types.IRawRule; @@ -158,32 +158,36 @@ private static CompilePatternsResult _compilePatterns(@Nullable final Collection RuleId ruleId = null; final var patternInclude = pattern.getInclude(); if (patternInclude != null) { - if (patternInclude.charAt(0) == '#') { + + final var reference = IncludeReference.parseInclude(patternInclude); + switch (reference.kind) { + case Base: + ruleId = getCompiledRuleId(repository.getBase(), helper, repository); + break; + case Self: + ruleId = getCompiledRuleId(repository.getSelf(), helper, repository); + break; + + case RelativeReference: // Local include found in `repository` - final IRawRule localIncludedRule = repository.getRule(patternInclude.substring(1)); + final var localIncludedRule = repository.getRule(reference.ruleName); if (localIncludedRule != null) { ruleId = getCompiledRuleId(localIncludedRule, helper, repository); } else { LOGGER.log(WARNING, "CANNOT find rule for scopeName [{0}]. I am [{1}]", - patternInclude, repository.getBase().getName()); - } - } else if (patternInclude.equals(RawRepository.DOLLAR_BASE)) { - // Special include also found in `repository` - ruleId = getCompiledRuleId(repository.getBase(), helper, repository); - } else if (patternInclude.equals(RawRepository.DOLLAR_SELF)) { - // Special include also found in `repository` - ruleId = getCompiledRuleId(repository.getSelf(), helper, repository); - } else { - final String externalGrammarName; - final String externalGrammarInclude; - final int sharpIndex = patternInclude.indexOf('#'); - if (sharpIndex >= 0) { - externalGrammarName = patternInclude.substring(0, sharpIndex); - externalGrammarInclude = patternInclude.substring(sharpIndex + 1); - } else { - externalGrammarName = patternInclude; - externalGrammarInclude = null; + patternInclude, repository.getBase().getName()); } + break; + + case TopLevelReference: + case TopLevelRepositoryReference: + + final var externalGrammarName = reference.scopeName; + + @Nullable + final String externalGrammarInclude = reference.kind == IncludeReference.Kind.TopLevelRepositoryReference + ? reference.ruleName + : null; // External include final var externalGrammar = helper.getExternalGrammar(externalGrammarName, repository); @@ -205,6 +209,7 @@ private static CompilePatternsResult _compilePatterns(@Nullable final Collection LOGGER.log(WARNING, "CANNOT find grammar for scopeName [{0}]. I am [{1}]", patternInclude, repository.getBase().getName()); } + break; } } else { ruleId = getCompiledRuleId(pattern, helper, repository); diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/MoreCollections.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/MoreCollections.java index 426cddcc6..edb5b8976 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/MoreCollections.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/MoreCollections.java @@ -12,6 +12,7 @@ */ package org.eclipse.tm4e.core.internal.utils; +import java.util.Collections; import java.util.List; import org.eclipse.jdt.annotation.Nullable; @@ -44,6 +45,10 @@ public static T removeLastElement(final List list) { return list.remove(list.size() - 1); } - private MoreCollections() { - } + public static List nullToEmpty(@Nullable final List list) { + return list == null ? Collections.emptyList() : list; + } + + private MoreCollections() { + } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IGrammarConfiguration.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IGrammarConfiguration.java new file mode 100644 index 000000000..d34120cc4 --- /dev/null +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IGrammarConfiguration.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2022 Sebastian Thomschke and others. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. + * Initial license: MIT + * + * Contributors: + * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license + * - Sebastian Thomschke - translation and adaptation to Java + */ +package org.eclipse.tm4e.core.registry; + +import java.util.List; +import java.util.Map; + +import org.eclipse.jdt.annotation.Nullable; + +public interface IGrammarConfiguration { + + @Nullable + default Map getEmbeddedLanguages() { + return null; + } + + @Nullable + default Map getTokenTypes() { + return null; + } + + @Nullable + default List getBalancedBracketSelectors() { + return null; + } + + @Nullable + default List getUnbalancedBracketSelectors() { + return null; + } +} diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IGrammarSource.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IGrammarSource.java new file mode 100644 index 000000000..4e130e3fb --- /dev/null +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IGrammarSource.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2022 Sebastian Thomschke and others. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + */ +package org.eclipse.tm4e.core.registry; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.Reader; +import java.nio.file.Files; +import java.nio.file.Path; + +public interface IGrammarSource { + + static IGrammarSource fromFile(final Path file) { + return new IGrammarSource() { + @Override + public Reader getReader() throws IOException { + return Files.newBufferedReader(file); + } + + @Override + public String getFilePath() { + return file.toAbsolutePath().toString(); + } + }; + } + + static IGrammarSource fromResource(final Class clazz, final String resourceName) { + return new IGrammarSource() { + @Override + public BufferedReader getReader() throws IOException { + return new BufferedReader(new InputStreamReader(clazz.getResourceAsStream(resourceName))); + } + + @Override + public String getFilePath() { + return resourceName; + } + }; + } + + String getFilePath(); + + Reader getReader() throws IOException; +} diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IRegistryOptions.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IRegistryOptions.java index 465ce707c..3a243f4b5 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IRegistryOptions.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IRegistryOptions.java @@ -16,8 +16,6 @@ */ package org.eclipse.tm4e.core.registry; -import java.io.IOException; -import java.io.InputStream; import java.util.Collection; import java.util.List; @@ -32,28 +30,6 @@ */ public interface IRegistryOptions { - IRegistryOptions DEFAULT_LOCATOR = new IRegistryOptions() { - - @Nullable - @Override - public String getFilePath(final String scopeName) { - return null; - } - - @Nullable - @Override - public InputStream getInputStream(final String scopeName) { - return null; - } - - @Nullable - @Override - public Collection getInjections(final String scopeName) { - return null; - } - - }; - @Nullable default IRawTheme getTheme() { return null; @@ -65,11 +41,12 @@ default List getColorMap() { } @Nullable - String getFilePath(String scopeName); - - @Nullable - InputStream getInputStream(String scopeName) throws IOException; + default IGrammarSource getGrammarSource(@SuppressWarnings("unused") final String scopeName) { + return null; + } @Nullable - Collection<@NonNull String> getInjections(String scopeName); + default Collection<@NonNull String> getInjections(@SuppressWarnings("unused") final String scopeName) { + return null; + } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/Registry.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/Registry.java index f6bd7ff09..a8764d9fb 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/Registry.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/Registry.java @@ -16,16 +16,20 @@ */ package org.eclipse.tm4e.core.registry; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; -import java.util.ArrayList; +import static java.lang.System.Logger.Level.*; +import static org.eclipse.tm4e.core.internal.utils.MoreCollections.*; +import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*; + +import java.lang.System.Logger; +import java.util.HashMap; import java.util.List; import java.util.Map; import org.eclipse.jdt.annotation.Nullable; import org.eclipse.tm4e.core.TMException; import org.eclipse.tm4e.core.grammar.IGrammar; +import org.eclipse.tm4e.core.internal.grammar.BalancedBracketSelectors; +import org.eclipse.tm4e.core.internal.grammar.dependencies.ScopeDependencyProcessor; import org.eclipse.tm4e.core.internal.grammar.reader.GrammarReader; import org.eclipse.tm4e.core.internal.registry.SyncRegistry; import org.eclipse.tm4e.core.internal.theme.IRawTheme; @@ -34,129 +38,177 @@ /** * The registry that will hold all grammars. * - * TODO outdated compared to upstream as of: - * https://github.com/microsoft/vscode-textmate/commit/b166b75fa72d2dd3efce0d68c98c2bd10adc1ef1 - * * @see * github.com/Microsoft/vscode-textmate/blob/master/src/main.ts * */ -public class Registry { +public final class Registry { + + private static final Logger LOGGER = System.getLogger(Registry.class.getName()); - private final IRegistryOptions options; - private final SyncRegistry syncRegistry; + private final IRegistryOptions _options; + private final SyncRegistry _syncRegistry; + private final Map _ensureGrammarCache = new HashMap<>(); public Registry() { - this(IRegistryOptions.DEFAULT_LOCATOR); + this(new IRegistryOptions() { + }); } public Registry(final IRegistryOptions options) { - this.options = options; - this.syncRegistry = new SyncRegistry(Theme.createFromRawTheme(options.getTheme(), options.getColorMap())); + this._options = options; + + this._syncRegistry = new SyncRegistry( + Theme.createFromRawTheme(options.getTheme(), options.getColorMap())); } /** * Change the theme. Once called, no previous `ruleStack` should be used anymore. */ public void setTheme(final IRawTheme theme) { - this.syncRegistry.setTheme(Theme.createFromRawTheme(theme, options.getColorMap())); + this._syncRegistry.setTheme(Theme.createFromRawTheme(theme, _options.getColorMap())); } /** * Returns a lookup array for color ids. */ public List getColorMap() { - return this.syncRegistry.getColorMap(); + return this._syncRegistry.getColorMap(); } + /** + * Load the grammar for `scopeName` and all referenced included grammars asynchronously. + * Please do not use language id 0. + */ @Nullable - public IGrammar loadGrammar(final String initialScopeName) { - final var remainingScopeNames = new ArrayList(); - remainingScopeNames.add(initialScopeName); + public IGrammar loadGrammarWithEmbeddedLanguages( + final String initialScopeName, + final int initialLanguage, + final Map embeddedLanguages) { + return this.loadGrammarWithConfiguration(initialScopeName, initialLanguage, + new IGrammarConfiguration() { + @Override + public @Nullable Map getEmbeddedLanguages() { + return embeddedLanguages; + } + }); + } - final var seenScopeNames = new ArrayList(); - seenScopeNames.add(initialScopeName); + /** + * Load the grammar for `scopeName` and all referenced included grammars asynchronously. + * Please do not use language id 0. + */ + @Nullable + public IGrammar loadGrammarWithConfiguration( + final String initialScopeName, + final int initialLanguage, + final IGrammarConfiguration configuration) { + return this._loadGrammar( + initialScopeName, + initialLanguage, + configuration.getEmbeddedLanguages(), + configuration.getTokenTypes(), + new BalancedBracketSelectors( + nullToEmpty(configuration.getBalancedBracketSelectors()), + nullToEmpty(configuration.getUnbalancedBracketSelectors()))); + } - while (!remainingScopeNames.isEmpty()) { - final String scopeName = remainingScopeNames.remove(0); + /** + * Load the grammar for `scopeName` and all referenced included grammars. + */ + @Nullable + public IGrammar loadGrammar(final String initialScopeName) { + return this._loadGrammar(initialScopeName, 0, null, null, null); + } - if (this.syncRegistry.lookup(scopeName) != null) { - continue; - } + @Nullable + private IGrammar _loadGrammar( + final String initialScopeName, + final int initialLanguage, + @Nullable final Map embeddedLanguages, + @Nullable final Map tokenTypes, + @Nullable final BalancedBracketSelectors balancedBracketSelectors) { + final var dependencyProcessor = new ScopeDependencyProcessor(this._syncRegistry, initialScopeName); + while (!dependencyProcessor.Q.isEmpty()) { + dependencyProcessor.Q.forEach(request -> this._loadSingleGrammar(request.scopeName)); + dependencyProcessor.processQueue(); + } - final String filePath = this.options.getFilePath(scopeName); - if (filePath == null) { - if (scopeName.equals(initialScopeName)) { - throw new TMException("Unknown location for grammar <" + initialScopeName + ">"); - } - continue; - } + return this._grammarForScopeName( + initialScopeName, + initialLanguage, + embeddedLanguages, + tokenTypes, + balancedBracketSelectors); + } - try (InputStream in = this.options.getInputStream(scopeName)) { - if (in == null) { - throw new TMException("Unknown location for grammar <" + initialScopeName + ">"); - } - final var grammar = GrammarReader.readGrammarSync(filePath, in); - final var injections = this.options.getInjections(scopeName); - - final var deps = this.syncRegistry.addGrammar(grammar, injections); - for (final String dep : deps) { - if (!seenScopeNames.contains(dep)) { - seenScopeNames.add(dep); - remainingScopeNames.add(dep); - } - } - } catch (final Exception e) { - if (scopeName.equals(initialScopeName)) { - throw new TMException("Unknown location for grammar <" + initialScopeName + ">", e); - } - } - } - return this.grammarForScopeName(initialScopeName); + private void _loadSingleGrammar(final String scopeName) { + this._ensureGrammarCache.computeIfAbsent(scopeName, this::_doLoadSingleGrammar); } - @Nullable - public IGrammar loadGrammarFromPathSync(final File file) throws Exception { - try (InputStream is = new FileInputStream(file)) { - return loadGrammarFromPathSync(file.getPath(), is); + private boolean _doLoadSingleGrammar(final String scopeName) { + final var grammarSource = this._options.getGrammarSource(scopeName); + if (grammarSource == null) { + LOGGER.log(WARNING, "No grammar source for scope [{0}]", scopeName); + return false; + } + try { + final var grammar = GrammarReader.readGrammarSync(grammarSource); + this._syncRegistry.addGrammar(grammar, this._options.getInjections(scopeName)); + } catch (final Exception ex) { + LOGGER.log(ERROR, "Loading grammar for scope [{0}] failed: {1}", scopeName, ex.getMessage(), ex); + return false; } + return true; } - @Nullable - public IGrammar loadGrammarFromPathSync(final String path, final InputStream in) throws Exception { - return loadGrammarFromPathSync(path, in, 0, null); + public IGrammar addGrammar(final IGrammarSource source) throws TMException { + return addGrammar(source, null, null, null); } - /** - * Load the grammar at `path` synchronously. - */ - @Nullable - public IGrammar loadGrammarFromPathSync(final String path, final InputStream in, final int initialLanguage, - @Nullable final Map embeddedLanguages) throws Exception { - final var rawGrammar = GrammarReader.readGrammarSync(path, in); - final var injections = this.options.getInjections(rawGrammar.getScopeName()); - this.syncRegistry.addGrammar(rawGrammar, injections); - return this.grammarForScopeName(rawGrammar.getScopeName(), initialLanguage, embeddedLanguages); + public IGrammar addGrammar( + final IGrammarSource source, + @Nullable final List injections, + @Nullable final Integer initialLanguage, + @Nullable final Map embeddedLanguages) throws TMException { + try { + final var rawGrammar = GrammarReader.readGrammarSync(source); + this._syncRegistry.addGrammar(rawGrammar, + injections == null || injections.isEmpty() + ? this._options.getInjections(rawGrammar.getScopeName()) + : injections); + return castNonNull( + this._grammarForScopeName(rawGrammar.getScopeName(), initialLanguage, embeddedLanguages, null, null)); + + } catch (final Exception ex) { + throw new TMException("Loading grammar from '" + source.getFilePath() + "' failed: " + ex.getMessage(), ex); + } } + /** + * Lookup a grammar. The grammar must first be registered via `loadGrammar` or `addGrammar`. + */ @Nullable public IGrammar grammarForScopeName(final String scopeName) { - return grammarForScopeName(scopeName, 0, null); + return _grammarForScopeName(scopeName, null, null, null, null); } /** - * Get the grammar for `scopeName`. - * The grammar must first be created via `loadGrammar` or `loadGrammarFromPathSync`. + * Get the grammar for `scopeName`. The grammar must first be created via `loadGrammar` or `addGrammar`. */ @Nullable - public IGrammar grammarForScopeName(final String scopeName, final int initialLanguage, - @Nullable final Map embeddedLanguages) { - return this.syncRegistry.grammarForScopeName(scopeName, initialLanguage, embeddedLanguages, /*TODO*/null, - /*TODO*/null); - } - - public IRegistryOptions getLocator() { - return options; + private IGrammar _grammarForScopeName( + final String scopeName, + @Nullable final Integer initialLanguage, + @Nullable final Map embeddedLanguages, + @Nullable final Map tokenTypes, + @Nullable final BalancedBracketSelectors balancedBracketSelectors) { + return this._syncRegistry.grammarForScopeName( + scopeName, + initialLanguage == null ? 0 : initialLanguage, + embeddedLanguages, + tokenTypes, + balancedBracketSelectors); } } diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/TestGrammar.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/TestGrammar.java index 0915f4710..bc677e34d 100644 --- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/TestGrammar.java +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/TestGrammar.java @@ -11,19 +11,17 @@ */ package org.eclipse.tm4e.core; -import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*; - import org.eclipse.tm4e.core.grammar.IGrammar; import org.eclipse.tm4e.core.grammar.ITokenizeLineResult; +import org.eclipse.tm4e.core.registry.IGrammarSource; import org.eclipse.tm4e.core.registry.Registry; public class TestGrammar { public static void main(final String[] args) throws Exception { - final var registry = new Registry(); - final IGrammar grammar = castNonNull(registry.loadGrammarFromPathSync("Angular2TypeScript.tmLanguage", - TestGrammar.class.getResourceAsStream("Angular2TypeScript.tmLanguage"))); + final IGrammar grammar = registry.addGrammar( + IGrammarSource.fromResource(TestGrammar.class, "Angular2TypeScript.tmLanguage")); final ITokenizeLineResult result = grammar.tokenizeLine("/** **/"); for (int i = 0; i < result.getTokens().length; i++) { diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/benchmark/GrammarBenchmark.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/benchmark/GrammarBenchmark.java index 47d9e5399..9564c086c 100644 --- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/benchmark/GrammarBenchmark.java +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/benchmark/GrammarBenchmark.java @@ -16,6 +16,7 @@ import org.eclipse.tm4e.core.grammar.IGrammar; import org.eclipse.tm4e.core.grammar.IStackElement; +import org.eclipse.tm4e.core.registry.IGrammarSource; import org.eclipse.tm4e.core.registry.Registry; public final class GrammarBenchmark implements Runnable { @@ -35,20 +36,19 @@ public static void main(final String... args) throws Exception { /* * load the grammar */ - try (var grammarFileIS = GrammarBenchmark.class.getResourceAsStream("GrammarBenchmark.Java.tmLanguage.json")) { - grammar = new Registry().loadGrammarFromPathSync("GrammarBenchmark.Java.tmLanguage.json", grammarFileIS); - } + grammar = new Registry().addGrammar( + IGrammarSource.fromResource(GrammarBenchmark.class, "GrammarBenchmark.Java.tmLanguage.json")); /* * load the file to be parsed */ try (var sourceFileIS = GrammarBenchmark.class.getResourceAsStream("GrammarBenchmark.JavaFile.txt")) { sourceCode = new BufferedReader(new InputStreamReader(sourceFileIS, StandardCharsets.UTF_8)) - .lines() - .toArray(String[]::new); + .lines() + .toArray(String[]::new); } System.out.println( - String.format("Source Code chars: %,d", Arrays.stream(sourceCode).mapToInt(String::length).sum())); + String.format("Source Code chars: %,d", Arrays.stream(sourceCode).mapToInt(String::length).sum())); System.out.println(String.format("Source Code lines: %,d", sourceCode.length)); } diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarInjectionTest.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarInjectionTest.java index c8cd60fe6..ea6bd985c 100644 --- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarInjectionTest.java +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarInjectionTest.java @@ -11,15 +11,12 @@ */ package org.eclipse.tm4e.core.grammar; -import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*; - -import java.io.IOException; -import java.io.InputStream; import java.util.Collection; import java.util.List; import org.eclipse.jdt.annotation.Nullable; import org.eclipse.tm4e.core.Data; +import org.eclipse.tm4e.core.registry.IGrammarSource; import org.eclipse.tm4e.core.registry.IRegistryOptions; import org.eclipse.tm4e.core.registry.Registry; import org.junit.jupiter.api.Assertions; @@ -27,63 +24,53 @@ /** * Test for grammar tokenizer. - * */ public class GrammarInjectionTest { - private static final String[] EXPECTED_TOKENS = { - "Token from 0 to 1 with scopes [source.ts, meta.decorator.ts, punctuation.decorator.ts]", - "Token from 1 to 10 with scopes [source.ts, meta.decorator.ts, entity.name.function.ts]", - "Token from 10 to 11 with scopes [source.ts, meta.decorator.ts, meta.brace.round.ts]", - "Token from 11 to 12 with scopes [source.ts, meta.decorator.ts, meta.object-literal.ts, punctuation.definition.block.ts]", - "Token from 12 to 20 with scopes [source.ts, meta.decorator.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]", - "Token from 20 to 21 with scopes [source.ts, meta.decorator.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]", - "Token from 21 to 22 with scopes [source.ts, meta.decorator.ts, meta.object-literal.ts, meta.object.member.ts, string.template.ts, punctuation.definition.string.template.begin.ts]", - "Token from 22 to 38 with scopes [source.ts, meta.decorator.ts, meta.object-literal.ts, meta.object.member.ts, string.template.ts]", - "Token from 38 to 39 with scopes [source.ts, meta.decorator.ts, meta.object-literal.ts, meta.object.member.ts, string.template.ts, punctuation.definition.string.template.end.ts]", - "Token from 39 to 40 with scopes [source.ts, meta.decorator.ts, meta.object-literal.ts, punctuation.definition.block.ts]", - "Token from 40 to 41 with scopes [source.ts, meta.decorator.ts, meta.brace.round.ts]"}; - - @Test - public void angular2TokenizeLine() throws Exception { - final var registry = new Registry(new IRegistryOptions() { + private static final String[] EXPECTED_TOKENS = { + "Token from 0 to 1 with scopes [source.ts, meta.decorator.ts, punctuation.decorator.ts]", + "Token from 1 to 10 with scopes [source.ts, meta.decorator.ts, entity.name.function.ts]", + "Token from 10 to 11 with scopes [source.ts, meta.decorator.ts, meta.brace.round.ts]", + "Token from 11 to 12 with scopes [source.ts, meta.decorator.ts, meta.object-literal.ts, punctuation.definition.block.ts]", + "Token from 12 to 20 with scopes [source.ts, meta.decorator.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]", + "Token from 20 to 21 with scopes [source.ts, meta.decorator.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]", + "Token from 21 to 22 with scopes [source.ts, meta.decorator.ts, meta.object-literal.ts, meta.object.member.ts, string.template.ts, punctuation.definition.string.template.begin.ts]", + "Token from 22 to 38 with scopes [source.ts, meta.decorator.ts, meta.object-literal.ts, meta.object.member.ts, string.template.ts]", + "Token from 38 to 39 with scopes [source.ts, meta.decorator.ts, meta.object-literal.ts, meta.object.member.ts, string.template.ts, punctuation.definition.string.template.end.ts]", + "Token from 39 to 40 with scopes [source.ts, meta.decorator.ts, meta.object-literal.ts, punctuation.definition.block.ts]", + "Token from 40 to 41 with scopes [source.ts, meta.decorator.ts, meta.brace.round.ts]" }; - @Nullable - @Override - public InputStream getInputStream(@Nullable final String scopeName) throws IOException { - return Data.class.getResourceAsStream(getFilePath(scopeName)); - } + @Test + public void angular2TokenizeLine() throws Exception { + final var registry = new Registry(new IRegistryOptions() { - @Nullable - @Override - public Collection getInjections(@Nullable final String scopeName) { - return List.of("template.ng", "styles.ng"); - } + @Nullable + @Override + public Collection getInjections(@Nullable final String scopeName) { + return List.of("template.ng", "styles.ng"); + } - @Nullable - @Override - public String getFilePath(@Nullable final String scopeName) { - if (scopeName != null) { - return switch (scopeName) { - case "css.json" -> "css.json"; - case "source.js" -> "JavaScript.tmLanguage.json"; - case "text.html.basic" -> "html.json"; - case "source.ts" -> "TypeScript.tmLanguage.json"; - case "template.ng" -> "template.ng.json"; - case "styles.ng" -> "styles.ng.json"; - default -> null; - }; - } - return null; - } - }); - final IGrammar grammar = registry.loadGrammar("source.ts"); - final var lineTokens = castNonNull(grammar).tokenizeLine("@Component({template:``})"); - for (int i = 0; i < lineTokens.getTokens().length; i++) { - final IToken token = lineTokens.getTokens()[i]; - final var s = "Token from " + token.getStartIndex() + " to " + token.getEndIndex() + " with scopes " + token.getScopes(); - System.err.println(s); - Assertions.assertEquals(EXPECTED_TOKENS[i], s); - } - } + @Override + public @Nullable IGrammarSource getGrammarSource(final String scopeName) { + return switch (scopeName) { + case "source.css" -> IGrammarSource.fromResource(Data.class, "css.json"); + case "source.js" -> IGrammarSource.fromResource(Data.class, "JavaScript.tmLanguage.json"); + case "styles.ng" -> IGrammarSource.fromResource(Data.class, "styles.ng.json"); + case "template.ng" -> IGrammarSource.fromResource(Data.class, "template.ng.json"); + case "text.html.basic" -> IGrammarSource.fromResource(Data.class, "html.json"); + default -> null; + }; + } + }); + final IGrammar grammar = registry.addGrammar( + IGrammarSource.fromResource(Data.class, "TypeScript.tmLanguage.json")); + final var lineTokens = grammar.tokenizeLine("@Component({template:``})"); + for (int i = 0; i < lineTokens.getTokens().length; i++) { + final IToken token = lineTokens.getTokens()[i]; + final var s = "Token from " + token.getStartIndex() + " to " + token.getEndIndex() + " with scopes " + + token.getScopes(); + System.err.println(s); + Assertions.assertEquals(EXPECTED_TOKENS[i], s); + } + } } diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest.java index 50a2b2ac5..e1efeac40 100644 --- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest.java +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest.java @@ -1,19 +1,20 @@ /** - * Copyright (c) 2015-2017 Angelo ZERR. + * Copyright (c) 2015-2017 Angelo ZERR. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * - * Contributors: - * Angelo Zerr - initial API and implementation + * Contributors: + * Angelo Zerr - initial API and implementation */ package org.eclipse.tm4e.core.grammar; import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*; import org.eclipse.tm4e.core.Data; +import org.eclipse.tm4e.core.registry.IGrammarSource; import org.eclipse.tm4e.core.registry.Registry; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -25,50 +26,49 @@ public class GrammarTest { private static final String[] EXPECTED_TOKENS = { - "Token from 0 to 8 with scopes [source.js, meta.function.js, storage.type.function.js]", - "Token from 8 to 9 with scopes [source.js, meta.function.js]", - "Token from 9 to 12 with scopes [source.js, meta.function.js, entity.name.function.js]", - "Token from 12 to 13 with scopes [source.js, meta.function.js, meta.function.type.parameter.js, meta.brace.round.js]", - "Token from 13 to 14 with scopes [source.js, meta.function.js, meta.function.type.parameter.js, parameter.name.js, variable.parameter.js]", - "Token from 14 to 15 with scopes [source.js, meta.function.js, meta.function.type.parameter.js]", - "Token from 15 to 16 with scopes [source.js, meta.function.js, meta.function.type.parameter.js, parameter.name.js, variable.parameter.js]", - "Token from 16 to 17 with scopes [source.js, meta.function.js, meta.function.type.parameter.js, meta.brace.round.js]", - "Token from 17 to 18 with scopes [source.js, meta.function.js]", - "Token from 18 to 19 with scopes [source.js, meta.function.js, meta.decl.block.js, meta.brace.curly.js]", - "Token from 19 to 20 with scopes [source.js, meta.function.js, meta.decl.block.js]", - "Token from 20 to 26 with scopes [source.js, meta.function.js, meta.decl.block.js, keyword.control.js]", - "Token from 26 to 28 with scopes [source.js, meta.function.js, meta.decl.block.js]", - "Token from 28 to 29 with scopes [source.js, meta.function.js, meta.decl.block.js, keyword.operator.arithmetic.js]", - "Token from 29 to 32 with scopes [source.js, meta.function.js, meta.decl.block.js]", - "Token from 32 to 33 with scopes [source.js, meta.function.js, meta.decl.block.js, meta.brace.curly.js]" }; + "Token from 0 to 8 with scopes [source.js, meta.function.js, storage.type.function.js]", + "Token from 8 to 9 with scopes [source.js, meta.function.js]", + "Token from 9 to 12 with scopes [source.js, meta.function.js, entity.name.function.js]", + "Token from 12 to 13 with scopes [source.js, meta.function.js, meta.function.type.parameter.js, meta.brace.round.js]", + "Token from 13 to 14 with scopes [source.js, meta.function.js, meta.function.type.parameter.js, parameter.name.js, variable.parameter.js]", + "Token from 14 to 15 with scopes [source.js, meta.function.js, meta.function.type.parameter.js]", + "Token from 15 to 16 with scopes [source.js, meta.function.js, meta.function.type.parameter.js, parameter.name.js, variable.parameter.js]", + "Token from 16 to 17 with scopes [source.js, meta.function.js, meta.function.type.parameter.js, meta.brace.round.js]", + "Token from 17 to 18 with scopes [source.js, meta.function.js]", + "Token from 18 to 19 with scopes [source.js, meta.function.js, meta.decl.block.js, meta.brace.curly.js]", + "Token from 19 to 20 with scopes [source.js, meta.function.js, meta.decl.block.js]", + "Token from 20 to 26 with scopes [source.js, meta.function.js, meta.decl.block.js, keyword.control.js]", + "Token from 26 to 28 with scopes [source.js, meta.function.js, meta.decl.block.js]", + "Token from 28 to 29 with scopes [source.js, meta.function.js, meta.decl.block.js, keyword.operator.arithmetic.js]", + "Token from 29 to 32 with scopes [source.js, meta.function.js, meta.decl.block.js]", + "Token from 32 to 33 with scopes [source.js, meta.function.js, meta.decl.block.js, meta.brace.curly.js]" }; private static final String[] EXPECTED_MULTI_LINE_TOKENS = { - "Token from 0 to 8 with scopes [source.js, meta.function.js, storage.type.function.js]", - "Token from 8 to 9 with scopes [source.js, meta.function.js]", - "Token from 9 to 12 with scopes [source.js, meta.function.js, entity.name.function.js]", - "Token from 12 to 13 with scopes [source.js, meta.function.js, meta.function.type.parameter.js, meta.brace.round.js]", - "Token from 13 to 14 with scopes [source.js, meta.function.js, meta.function.type.parameter.js, parameter.name.js, variable.parameter.js]", - "Token from 14 to 15 with scopes [source.js, meta.function.js, meta.function.type.parameter.js]", - "Token from 15 to 16 with scopes [source.js, meta.function.js, meta.function.type.parameter.js, parameter.name.js, variable.parameter.js]", - "Token from 16 to 17 with scopes [source.js, meta.function.js, meta.function.type.parameter.js, meta.brace.round.js]", - "Token from 0 to 1 with scopes [source.js, meta.function.js, meta.decl.block.js, meta.brace.curly.js]", - "Token from 1 to 2 with scopes [source.js, meta.function.js, meta.decl.block.js]", - "Token from 2 to 8 with scopes [source.js, meta.function.js, meta.decl.block.js, keyword.control.js]", - "Token from 8 to 10 with scopes [source.js, meta.function.js, meta.decl.block.js]", - "Token from 10 to 11 with scopes [source.js, meta.function.js, meta.decl.block.js, keyword.operator.arithmetic.js]", - "Token from 11 to 14 with scopes [source.js, meta.function.js, meta.decl.block.js]", - "Token from 14 to 15 with scopes [source.js, meta.function.js, meta.decl.block.js, meta.brace.curly.js]" }; + "Token from 0 to 8 with scopes [source.js, meta.function.js, storage.type.function.js]", + "Token from 8 to 9 with scopes [source.js, meta.function.js]", + "Token from 9 to 12 with scopes [source.js, meta.function.js, entity.name.function.js]", + "Token from 12 to 13 with scopes [source.js, meta.function.js, meta.function.type.parameter.js, meta.brace.round.js]", + "Token from 13 to 14 with scopes [source.js, meta.function.js, meta.function.type.parameter.js, parameter.name.js, variable.parameter.js]", + "Token from 14 to 15 with scopes [source.js, meta.function.js, meta.function.type.parameter.js]", + "Token from 15 to 16 with scopes [source.js, meta.function.js, meta.function.type.parameter.js, parameter.name.js, variable.parameter.js]", + "Token from 16 to 17 with scopes [source.js, meta.function.js, meta.function.type.parameter.js, meta.brace.round.js]", + "Token from 0 to 1 with scopes [source.js, meta.function.js, meta.decl.block.js, meta.brace.curly.js]", + "Token from 1 to 2 with scopes [source.js, meta.function.js, meta.decl.block.js]", + "Token from 2 to 8 with scopes [source.js, meta.function.js, meta.decl.block.js, keyword.control.js]", + "Token from 8 to 10 with scopes [source.js, meta.function.js, meta.decl.block.js]", + "Token from 10 to 11 with scopes [source.js, meta.function.js, meta.decl.block.js, keyword.operator.arithmetic.js]", + "Token from 11 to 14 with scopes [source.js, meta.function.js, meta.decl.block.js]", + "Token from 14 to 15 with scopes [source.js, meta.function.js, meta.decl.block.js, meta.brace.curly.js]" }; @Test public void tokenizeLine() throws Exception { final var registry = new Registry(); - final var path = "JavaScript.tmLanguage"; - final IGrammar grammar = registry.loadGrammarFromPathSync(path, Data.class.getResourceAsStream(path)); + final IGrammar grammar = registry.addGrammar(IGrammarSource.fromResource(Data.class, "JavaScript.tmLanguage")); final ITokenizeLineResult lineTokens = castNonNull(grammar).tokenizeLine("function add(a,b) { return a+b; }"); for (int i = 0; i < lineTokens.getTokens().length; i++) { final IToken token = lineTokens.getTokens()[i]; final String s = "Token from " + token.getStartIndex() + " to " + token.getEndIndex() + " with scopes " - + token.getScopes(); + + token.getScopes(); Assertions.assertEquals(EXPECTED_TOKENS[i], s); } } @@ -76,20 +76,19 @@ public void tokenizeLine() throws Exception { @Test public void tokenizeLines() throws Exception { final var registry = new Registry(); - final var path = "JavaScript.tmLanguage"; - final IGrammar grammar = registry.loadGrammarFromPathSync(path, Data.class.getResourceAsStream(path)); + final IGrammar grammar = registry.addGrammar(IGrammarSource.fromResource(Data.class, "JavaScript.tmLanguage")); IStackElement ruleStack = null; int i = 0; int j = 0; final String[] lines = { "function add(a,b)", "{ return a+b; }" }; - for (int l = 0; l < lines.length; l++) { - final ITokenizeLineResult lineTokens = castNonNull(grammar).tokenizeLine(lines[l], ruleStack); + for (final String line : lines) { + final ITokenizeLineResult lineTokens = castNonNull(grammar).tokenizeLine(line, ruleStack); ruleStack = lineTokens.getRuleStack(); for (i = 0; i < lineTokens.getTokens().length; i++) { final IToken token = lineTokens.getTokens()[i]; final String s = "Token from " + token.getStartIndex() + " to " + token.getEndIndex() + " with scopes " - + token.getScopes(); + + token.getScopes(); Assertions.assertEquals(EXPECTED_MULTI_LINE_TOKENS[i + j], s); } j = i; diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest2.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest2.java index 131e23785..69bcaadc1 100644 --- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest2.java +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest2.java @@ -11,7 +11,6 @@ */ package org.eclipse.tm4e.core.grammar; -import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*; import static org.junit.jupiter.api.Assertions.*; import java.io.BufferedReader; @@ -20,6 +19,7 @@ import java.util.Arrays; import org.eclipse.tm4e.core.Data; +import org.eclipse.tm4e.core.registry.IGrammarSource; import org.eclipse.tm4e.core.registry.Registry; import org.junit.jupiter.api.Test; @@ -29,58 +29,55 @@ */ class GrammarTest2 { - @Test - void tokenizeLines() throws Exception { - final var registry = new Registry(); - final var path = "JavaScript.tmLanguage"; - try (var is = Data.class.getResourceAsStream(path)) { - final var grammar = castNonNull(registry.loadGrammarFromPathSync(path, is)); + @Test + void tokenizeLines() throws Exception { + final var registry = new Registry(); + final var grammar = registry.addGrammar(IGrammarSource.fromResource(Data.class, "JavaScript.tmLanguage")); - IStackElement ruleStack = null; - int i = 0; + IStackElement ruleStack = null; + int i = 0; - final var lines = new ArrayList(); - try (var reader = new BufferedReader(new InputStreamReader(Data.class.getResourceAsStream("raytracer.ts")));) { - String line = null; - while ((line = reader.readLine()) != null) { - lines.add(line); - } - } + final var lines = new ArrayList(); + try (var reader = new BufferedReader(new InputStreamReader(Data.class.getResourceAsStream("raytracer.ts")));) { + String line = null; + while ((line = reader.readLine()) != null) { + lines.add(line); + } + } - int t = 0; - boolean stop = false; - final long start = System.currentTimeMillis(); - for (final String line : lines) { - final ITokenizeLineResult lineTokens = grammar.tokenizeLine(line, ruleStack); - if (stop) { - t = 1000; - Thread.sleep(t); - stop = false; - } - ruleStack = lineTokens.getRuleStack(); - for (i = 0; i < lineTokens.getTokens().length; i++) { - final IToken token = lineTokens.getTokens()[i]; - final var s = "Token from " + token.getStartIndex() + " to " + token.getEndIndex() + " with scopes " + token.getScopes(); - // System.err.println(s); - // Assert.assertEquals(EXPECTED_MULTI_LINE_TOKENS[i + j], s); - } - } - System.out.println(System.currentTimeMillis() - start - t); - } - } + int t = 0; + boolean stop = false; + final long start = System.currentTimeMillis(); + for (final String line : lines) { + final ITokenizeLineResult lineTokens = grammar.tokenizeLine(line, ruleStack); + if (stop) { + t = 1000; + Thread.sleep(t); + stop = false; + } + ruleStack = lineTokens.getRuleStack(); + for (i = 0; i < lineTokens.getTokens().length; i++) { + final IToken token = lineTokens.getTokens()[i]; + final var s = "Token from " + token.getStartIndex() + " to " + token.getEndIndex() + " with scopes " + + token.getScopes(); + // System.err.println(s); + // Assert.assertEquals(EXPECTED_MULTI_LINE_TOKENS[i + j], s); + } + } + System.out.println(System.currentTimeMillis() - start - t); + } - @Test - public void testYamlMultiline() throws Exception { - final var registry = new Registry(); - final var path = "yaml.tmLanguage.json"; - try (var in = Data.class.getResourceAsStream(path)) { - final var grammar = castNonNull(registry.loadGrammarFromPathSync(path, in)); - final var lines = ">\n should.be.string.unquoted.block.yaml\n should.also.be.string.unquoted.block.yaml"; - final var result = TokenizationUtils.tokenizeText(lines, grammar).iterator(); - assertTrue(Arrays.stream(result.next().getTokens()).anyMatch(t -> t.getScopes().contains( - "keyword.control.flow.block-scalar.folded.yaml"))); - assertTrue(Arrays.stream(result.next().getTokens()).anyMatch(t -> t.getScopes().contains("string.unquoted.block.yaml"))); - assertTrue(Arrays.stream(result.next().getTokens()).anyMatch(t -> t.getScopes().contains("string.unquoted.block.yaml"))); - } - } + @Test + public void testYamlMultiline() throws Exception { + final var registry = new Registry(); + final var grammar = registry.addGrammar(IGrammarSource.fromResource(Data.class, "yaml.tmLanguage.json")); + final var lines = ">\n should.be.string.unquoted.block.yaml\n should.also.be.string.unquoted.block.yaml"; + final var result = TokenizationUtils.tokenizeText(lines, grammar).iterator(); + assertTrue(Arrays.stream(result.next().getTokens()).anyMatch(t -> t.getScopes().contains( + "keyword.control.flow.block-scalar.folded.yaml"))); + assertTrue(Arrays.stream(result.next().getTokens()) + .anyMatch(t -> t.getScopes().contains("string.unquoted.block.yaml"))); + assertTrue(Arrays.stream(result.next().getTokens()) + .anyMatch(t -> t.getScopes().contains("string.unquoted.block.yaml"))); + } } diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/MarkDown.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/MarkDown.java index 64ea8c951..f1458b16b 100644 --- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/MarkDown.java +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/MarkDown.java @@ -1,31 +1,29 @@ /** - * Copyright (c) 2015-2017 Angelo ZERR. + * Copyright (c) 2015-2017 Angelo ZERR. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * - * Contributors: - * Angelo Zerr - initial API and implementation + * Contributors: + * Angelo Zerr - initial API and implementation */ package org.eclipse.tm4e.core.grammar; -import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*; - import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import org.eclipse.tm4e.core.Data; +import org.eclipse.tm4e.core.registry.IGrammarSource; import org.eclipse.tm4e.core.registry.Registry; public class MarkDown { public static void main(final String[] args) throws Exception { final var registry = new Registry(); - final var path = "Markdown.tmLanguage"; - final IGrammar grammar = castNonNull(registry.loadGrammarFromPathSync(path, Data.class.getResourceAsStream(path))); + final IGrammar grammar = registry.addGrammar(IGrammarSource.fromResource(Data.class, "Markdown.tmLanguage")); final var lines = new ArrayList(); try (var reader = new BufferedReader(new InputStreamReader(Data.class.getResourceAsStream("test.md.txt")))) { @@ -37,7 +35,6 @@ public static void main(final String[] args) throws Exception { e.printStackTrace(); } - final long start = System.currentTimeMillis(); IStackElement ruleStack = null; @@ -46,10 +43,10 @@ public static void main(final String[] args) throws Exception { final ITokenizeLineResult lineTokens = grammar.tokenizeLine(line, ruleStack); ruleStack = lineTokens.getRuleStack(); for (i = 0; i < lineTokens.getTokens().length; i++) { -// IToken token = lineTokens.getTokens()[i]; -// String s = "Token from " + token.getStartIndex() + " to " + token.getEndIndex() + " with scopes " -// + token.getScopes(); - //System.err.println(s); + // IToken token = lineTokens.getTokens()[i]; + // String s = "Token from " + token.getStartIndex() + " to " + token.getEndIndex() + " with scopes " + // + token.getScopes(); + // System.err.println(s); // Assert.assertEquals(EXPECTED_MULTI_LINE_TOKENS[i + j], s); } } @@ -57,8 +54,8 @@ public static void main(final String[] args) throws Exception { } static String convertStreamToString(final java.io.InputStream is) { - try (var s = new java.util.Scanner(is).useDelimiter("\\A")) { - return s.hasNext() ? s.next() : ""; - } + try (var s = new java.util.Scanner(is).useDelimiter("\\A")) { + return s.hasNext() ? s.next() : ""; + } } } diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineTest.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineTest.java new file mode 100644 index 000000000..c00d47b68 --- /dev/null +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineTest.java @@ -0,0 +1,30 @@ +package org.eclipse.tm4e.core.internal.grammar; + +import org.eclipse.tm4e.core.Data; +import org.eclipse.tm4e.core.registry.IGrammarSource; +import org.eclipse.tm4e.core.registry.Registry; +import org.junit.jupiter.api.Test; + +public class TokenizeLineTest { + + @Test + void testTokenizeLine2() throws Exception { + final var grammar = new Registry().addGrammar(IGrammarSource.fromResource(Data.class, "JavaScript.tmLanguage")); + + final var lineTokens = grammar.tokenizeLine("function add(a,b) { return a+b; }"); + for (int i = 0; i < lineTokens.getTokens().length; i++) { + final var token = lineTokens.getTokens()[i]; + final var s = "Token from " + token.getStartIndex() + " to " + token.getEndIndex() + " with scopes " + + token.getScopes(); + System.out.println(s); + } + + System.out.println("----------"); + + final var lineTokens2 = grammar.tokenizeLine2("function add(a,b) { return a+b; }"); + for (int i = 0; i < lineTokens2.getTokens().length; i++) { + final int token = lineTokens2.getTokens()[i]; + System.out.println(token); + } + } +} diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/reader/GrammarReaderTest.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/reader/GrammarReaderTest.java index d9cda3d79..6e2300fdc 100644 --- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/reader/GrammarReaderTest.java +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/reader/GrammarReaderTest.java @@ -14,34 +14,31 @@ import static org.junit.jupiter.api.Assertions.*; -import java.io.InputStream; - import org.eclipse.tm4e.core.Data; import org.eclipse.tm4e.core.internal.types.IRawGrammar; +import org.eclipse.tm4e.core.registry.IGrammarSource; import org.junit.jupiter.api.Test; public class GrammarReaderTest { - private IRawGrammar loadGrammar(final String path) throws Exception { - try (InputStream is = Data.class.getResourceAsStream(path)) { - return GrammarReader.readGrammarSync(path, is); - } - } - /** * Loads the same TextMate grammar in different formats and checks * loading them results in equal IRawGrammar objects. */ @Test public void testLoadDifferentPlistFormats() throws Exception { - final IRawGrammar grammarFromXML = loadGrammar("JavaScript.tmLanguage"); - final IRawGrammar grammarFromJSON = loadGrammar("JavaScript.tmLanguage.json"); - final IRawGrammar grammarFromYAML = loadGrammar("JavaScript.tmLanguage.yaml"); + final IRawGrammar grammarFromXML = GrammarReader + .readGrammarSync(IGrammarSource.fromResource(Data.class, "JavaScript.tmLanguage")); assertNotNull(grammarFromXML); assertFalse(grammarFromXML.getFileTypes().isEmpty()); + final IRawGrammar grammarFromJSON = GrammarReader + .readGrammarSync(IGrammarSource.fromResource(Data.class, "JavaScript.tmLanguage.json")); assertEquals(grammarFromXML, grammarFromJSON); + + final IRawGrammar grammarFromYAML = GrammarReader + .readGrammarSync(IGrammarSource.fromResource(Data.class, "JavaScript.tmLanguage.yaml")); assertEquals(grammarFromJSON, grammarFromYAML); } } diff --git a/org.eclipse.tm4e.registry/src/main/java/org/eclipse/tm4e/registry/internal/AbstractGrammarRegistryManager.java b/org.eclipse.tm4e.registry/src/main/java/org/eclipse/tm4e/registry/internal/AbstractGrammarRegistryManager.java index dce4b21db..a7eb3c5f2 100644 --- a/org.eclipse.tm4e.registry/src/main/java/org/eclipse/tm4e/registry/internal/AbstractGrammarRegistryManager.java +++ b/org.eclipse.tm4e.registry/src/main/java/org/eclipse/tm4e/registry/internal/AbstractGrammarRegistryManager.java @@ -12,15 +12,19 @@ */ package org.eclipse.tm4e.registry.internal; +import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*; + import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; +import java.io.InputStreamReader; +import java.io.Reader; import java.util.Collection; import java.util.List; +import java.util.stream.Stream; import org.eclipse.core.runtime.content.IContentType; import org.eclipse.jdt.annotation.Nullable; import org.eclipse.tm4e.core.grammar.IGrammar; +import org.eclipse.tm4e.core.registry.IGrammarSource; import org.eclipse.tm4e.core.registry.IRegistryOptions; import org.eclipse.tm4e.core.registry.Registry; import org.eclipse.tm4e.registry.IGrammarDefinition; @@ -28,69 +32,74 @@ /** * Eclipse grammar registry. - * */ -public abstract class AbstractGrammarRegistryManager extends Registry implements IGrammarRegistryManager { +public abstract class AbstractGrammarRegistryManager implements IGrammarRegistryManager { - private final GrammarCache pluginCache; - final GrammarCache userCache; + private final GrammarCache pluginCache = new GrammarCache(); + protected final GrammarCache userCache = new GrammarCache(); private static final class EclipseRegistryOptions implements IRegistryOptions { @Nullable - private AbstractGrammarRegistryManager registry; + private AbstractGrammarRegistryManager registryManager; - private void setRegistry(final AbstractGrammarRegistryManager registry) { - this.registry = registry; + private void setRegistry(final AbstractGrammarRegistryManager registryManager) { + this.registryManager = registryManager; } @Nullable @Override public Collection getInjections(final String scopeName) { - final var registry = this.registry; - if (registry == null) { + final var registryManager = this.registryManager; + if (registryManager == null) { return null; } - return registry.getInjections(scopeName); + return registryManager.getInjections(scopeName); } - @Nullable @Override - public String getFilePath(final String scopeName) { + public @Nullable IGrammarSource getGrammarSource(String scopeName) { final IGrammarDefinition info = getDefinition(scopeName); - return info != null ? info.getPath() : null; - } + if (info == null) + return null; - @Nullable - @Override - public InputStream getInputStream(final String scopeName) throws IOException { - final IGrammarDefinition info = getDefinition(scopeName); - return info != null ? info.getInputStream() : null; + return new IGrammarSource() { + @Override + public Reader getReader() throws IOException { + return new InputStreamReader(info.getInputStream()); + } + + @Override + public String getFilePath() { + return defaultIfNull(info.getPath(), "unknown"); + } + }; } @Nullable private IGrammarDefinition getDefinition(final String scopeName) { - final var registry = this.registry; - if (registry == null) { + final var registryManager = this.registryManager; + if (registryManager == null) { return null; } - final IGrammarDefinition definition = registry.userCache.getDefinition(scopeName); + final var definition = registryManager.userCache.getDefinition(scopeName); if (definition != null) { return definition; } - return registry.pluginCache.getDefinition(scopeName); + return registryManager.pluginCache.getDefinition(scopeName); } } + private final Registry registry; + protected AbstractGrammarRegistryManager() { - this(new EclipseRegistryOptions()); - ((EclipseRegistryOptions) getLocator()).setRegistry(this); + final var options = new EclipseRegistryOptions(); + options.setRegistry(this); + registry = new Registry(options); } - protected AbstractGrammarRegistryManager(final IRegistryOptions locator) { - super(locator); - this.pluginCache = new GrammarCache(); - this.userCache = new GrammarCache(); + protected AbstractGrammarRegistryManager(final IRegistryOptions options) { + registry = new Registry(options); } @Nullable @@ -100,10 +109,10 @@ public IGrammar getGrammarFor(final IContentType @Nullable [] contentTypes) { return null; } // Find grammar by content type - for (final IContentType contentType : contentTypes) { + for (final var contentType : contentTypes) { final String scopeName = getScopeNameForContentType(contentType); if (scopeName != null) { - final IGrammar grammar = getGrammarForScope(scopeName); + final var grammar = getGrammarForScope(scopeName); if (grammar != null) { return grammar; } @@ -127,12 +136,11 @@ public IGrammar getGrammarForFileType(String fileType) { if (fileType.startsWith(".")) { fileType = fileType.substring(1); } - for (final IGrammarDefinition definition : definitions) { - // Not very optimized because it forces the load of the whole - // grammar. + for (final var definition : definitions) { + // Not very optimized because it forces the load of the whole grammar. // Extension Point grammar should perhaps stores file type bindings // like content type/scope binding? - final IGrammar grammar = getGrammarForScope(definition.getScopeName()); + final var grammar = getGrammarForScope(definition.getScopeName()); if (grammar != null) { final Collection fileTypes = grammar.getFileTypes(); if (fileTypes.contains(fileType)) { @@ -146,11 +154,10 @@ public IGrammar getGrammarForFileType(String fileType) { @Nullable @Override public IGrammarDefinition[] getDefinitions() { - final Collection pluginDefinitions = pluginCache.getDefinitions(); - final Collection userDefinitions = userCache.getDefinitions(); - final var definitions = new ArrayList<>(pluginDefinitions); - definitions.addAll(userDefinitions); - return definitions.toArray(IGrammarDefinition[]::new); + return Stream.concat( + pluginCache.getDefinitions().stream(), + userCache.getDefinitions().stream()) + .toArray(IGrammarDefinition[]::new); } /** @@ -163,11 +170,11 @@ private IGrammar getGrammar(@Nullable final String scopeName) { if (scopeName == null) { return null; } - final IGrammar grammar = super.grammarForScopeName(scopeName); + final var grammar = registry.grammarForScopeName(scopeName); if (grammar != null) { return grammar; } - return super.loadGrammar(scopeName); + return registry.loadGrammar(scopeName); } @Nullable diff --git a/org.eclipse.tm4e.samples/src/main/java/org/eclipse/tm4e/samples/angular2/Angular2ViewerConfiguration.java b/org.eclipse.tm4e.samples/src/main/java/org/eclipse/tm4e/samples/angular2/Angular2ViewerConfiguration.java index b8725b001..1198b6a9f 100644 --- a/org.eclipse.tm4e.samples/src/main/java/org/eclipse/tm4e/samples/angular2/Angular2ViewerConfiguration.java +++ b/org.eclipse.tm4e.samples/src/main/java/org/eclipse/tm4e/samples/angular2/Angular2ViewerConfiguration.java @@ -1,18 +1,16 @@ /** - * Copyright (c) 2015-2017 Angelo ZERR. + * Copyright (c) 2015-2017 Angelo ZERR. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * - * Contributors: - * Angelo Zerr - initial API and implementation + * Contributors: + * Angelo Zerr - initial API and implementation */ package org.eclipse.tm4e.samples.angular2; -import java.io.IOException; -import java.io.InputStream; import java.util.Arrays; import java.util.Collection; @@ -20,6 +18,7 @@ import org.eclipse.jface.text.source.ISourceViewer; import org.eclipse.jface.text.source.SourceViewerConfiguration; import org.eclipse.tm4e.core.grammar.IGrammar; +import org.eclipse.tm4e.core.registry.IGrammarSource; import org.eclipse.tm4e.core.registry.IRegistryOptions; import org.eclipse.tm4e.core.registry.Registry; import org.eclipse.tm4e.ui.text.TMPresentationReconciler; @@ -38,28 +37,21 @@ public IPresentationReconciler getPresentationReconciler(ISourceViewer viewer) { private IGrammar getGrammar() { Registry registry = new Registry(new IRegistryOptions() { - @Override - public InputStream getInputStream(String scopeName) throws IOException { - return Angular2ViewerConfiguration.class.getResourceAsStream(getFilePath(scopeName)); - } - @Override public Collection getInjections(String scopeName) { return Arrays.asList("template.ng", "styles.ng", "source.ng.css"); } @Override - public String getFilePath(String scopeName) { -// if ("source.ng.css".equals(scopeName)) { -// return "source.ng.css.json"; -// } else if ("source.ng.ts".equals(scopeName)) { -// return "source.ng.ts.json"; -// } else if ("template.ng".equals(scopeName)) { -// return "template.ng.json"; -// } else if ("styles.ng".equals(scopeName)) { -// return "styles.ng.json"; -// } - return scopeName + ".json"; + public IGrammarSource getGrammarSource(String scopeName) { + String resourceName = switch (scopeName) { + // case "source.ng.css" -> "source.ng.css.json"; + // case "source.ng.ts" -> "source.ng.ts.json"; + // case "template.ng" -> "template.ng.json"; + // case "styles.ng" -> "styles.ng.json"; + default -> scopeName + ".json"; + }; + return IGrammarSource.fromResource(Angular2ViewerConfiguration.class, resourceName); } }); return registry.loadGrammar("source.ng.ts"); diff --git a/org.eclipse.tm4e.samples/src/main/java/org/eclipse/tm4e/samples/typescript/JSXViewerConfiguration.java b/org.eclipse.tm4e.samples/src/main/java/org/eclipse/tm4e/samples/typescript/JSXViewerConfiguration.java index 0590f857a..0cc71c402 100644 --- a/org.eclipse.tm4e.samples/src/main/java/org/eclipse/tm4e/samples/typescript/JSXViewerConfiguration.java +++ b/org.eclipse.tm4e.samples/src/main/java/org/eclipse/tm4e/samples/typescript/JSXViewerConfiguration.java @@ -1,13 +1,13 @@ /** - * Copyright (c) 2015-2018 Angelo ZERR. + * Copyright (c) 2015-2018 Angelo ZERR. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * - * Contributors: - * Angelo Zerr - initial API and implementation + * Contributors: + * Angelo Zerr - initial API and implementation */ package org.eclipse.tm4e.samples.typescript; @@ -15,6 +15,7 @@ import org.eclipse.jface.text.source.ISourceViewer; import org.eclipse.jface.text.source.SourceViewerConfiguration; import org.eclipse.tm4e.core.grammar.IGrammar; +import org.eclipse.tm4e.core.registry.IGrammarSource; import org.eclipse.tm4e.core.registry.Registry; import org.eclipse.tm4e.ui.text.TMPresentationReconciler; @@ -33,10 +34,10 @@ private IGrammar getGrammar() { // TODO: cache the grammar Registry registry = new Registry(); try { - return registry.loadGrammarFromPathSync("TypeScriptReact.tmLanguage.json", - JSXViewerConfiguration.class.getResourceAsStream("TypeScriptReact.tmLanguage.json")); - } catch (Exception e) { - e.printStackTrace(); + return registry.addGrammar( + IGrammarSource.fromResource(JSXViewerConfiguration.class, "TypeScriptReact.tmLanguage.json")); + } catch (Exception ex) { + ex.printStackTrace(); return null; } } diff --git a/org.eclipse.tm4e.samples/src/main/java/org/eclipse/tm4e/samples/typescript/TypeScriptViewerConfiguration.java b/org.eclipse.tm4e.samples/src/main/java/org/eclipse/tm4e/samples/typescript/TypeScriptViewerConfiguration.java index 2a6385a5d..51c2bcd24 100644 --- a/org.eclipse.tm4e.samples/src/main/java/org/eclipse/tm4e/samples/typescript/TypeScriptViewerConfiguration.java +++ b/org.eclipse.tm4e.samples/src/main/java/org/eclipse/tm4e/samples/typescript/TypeScriptViewerConfiguration.java @@ -1,13 +1,13 @@ /** - * Copyright (c) 2015-2018 Angelo ZERR. + * Copyright (c) 2015-2018 Angelo ZERR. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * - * Contributors: - * Angelo Zerr - initial API and implementation + * Contributors: + * Angelo Zerr - initial API and implementation */ package org.eclipse.tm4e.samples.typescript; @@ -15,6 +15,7 @@ import org.eclipse.jface.text.source.ISourceViewer; import org.eclipse.jface.text.source.SourceViewerConfiguration; import org.eclipse.tm4e.core.grammar.IGrammar; +import org.eclipse.tm4e.core.registry.IGrammarSource; import org.eclipse.tm4e.core.registry.Registry; import org.eclipse.tm4e.ui.text.TMPresentationReconciler; @@ -26,7 +27,7 @@ public IPresentationReconciler getPresentationReconciler(ISourceViewer viewer) { TMPresentationReconciler reconciler = new TMPresentationReconciler(); // Set the TypeScript grammar reconciler.setGrammar(getGrammar()); - //reconciler.setThemeId(ThemeIdConstants.Monokai); + // reconciler.setThemeId(ThemeIdConstants.Monokai); return reconciler; } @@ -34,8 +35,8 @@ private IGrammar getGrammar() { // TODO: cache the grammar Registry registry = new Registry(); try { - return registry.loadGrammarFromPathSync("TypeScript.tmLanguage.json", - TypeScriptViewerConfiguration.class.getResourceAsStream("TypeScript.tmLanguage.json")); + return registry.addGrammar( + IGrammarSource.fromResource(TypeScriptViewerConfiguration.class, "TypeScript.tmLanguage.json")); } catch (Exception e) { e.printStackTrace(); return null; diff --git a/org.eclipse.tm4e.ui.tests/src/main/java/org/eclipse/tm4e/ui/internal/model/DocumentTMModelTest.java b/org.eclipse.tm4e.ui.tests/src/main/java/org/eclipse/tm4e/ui/internal/model/DocumentTMModelTest.java index e81b7939b..1a19258fd 100644 --- a/org.eclipse.tm4e.ui.tests/src/main/java/org/eclipse/tm4e/ui/internal/model/DocumentTMModelTest.java +++ b/org.eclipse.tm4e.ui.tests/src/main/java/org/eclipse/tm4e/ui/internal/model/DocumentTMModelTest.java @@ -12,6 +12,7 @@ package org.eclipse.tm4e.ui.internal.model; import org.eclipse.jface.text.Document; +import org.eclipse.tm4e.core.registry.IGrammarSource; import org.eclipse.tm4e.core.registry.Registry; import org.junit.jupiter.api.Test; @@ -22,7 +23,7 @@ void testMultiLineChange() throws Exception { final var document = new Document(); final var model = new TMDocumentModel(document); try { - model.setGrammar(new Registry().loadGrammarFromPathSync("TypeScript.tmLanguage.json", getClass().getClassLoader().getResourceAsStream("/grammars/TypeScript.tmLanguage.json"))); + model.setGrammar(new Registry().addGrammar(IGrammarSource.fromResource(getClass(), "/grammars/TypeScript.tmLanguage.json"))); document.set("a\nb\nc\nd"); model.addModelTokensChangedListener(e -> { }); diff --git a/org.eclipse.tm4e.ui.tests/src/main/java/org/eclipse/tm4e/ui/text/typescript/TMPresentationReconcilerTypeScriptTest.java b/org.eclipse.tm4e.ui.tests/src/main/java/org/eclipse/tm4e/ui/text/typescript/TMPresentationReconcilerTypeScriptTest.java index 0cc946ed9..cff5b0f48 100644 --- a/org.eclipse.tm4e.ui.tests/src/main/java/org/eclipse/tm4e/ui/text/typescript/TMPresentationReconcilerTypeScriptTest.java +++ b/org.eclipse.tm4e.ui.tests/src/main/java/org/eclipse/tm4e/ui/text/typescript/TMPresentationReconcilerTypeScriptTest.java @@ -16,6 +16,7 @@ import java.util.List; import org.eclipse.tm4e.core.grammar.IGrammar; +import org.eclipse.tm4e.core.registry.IGrammarSource; import org.eclipse.tm4e.core.registry.Registry; import org.eclipse.tm4e.ui.text.ICommand; import org.eclipse.tm4e.ui.text.TMEditor; @@ -26,7 +27,7 @@ public class TMPresentationReconcilerTypeScriptTest { - @Disabled ("Remove this annotation when org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed] will be fixed") + @Disabled("Remove this annotation when org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed] will be fixed") @Test void colorizeTypescript() throws Exception { @@ -36,8 +37,7 @@ void colorizeTypescript() throws Exception { assertEquals(1, commands.size()); final ICommand command = commands.get(0); - assertEquals( - "[" + assertEquals("[" + "StyleRange {0, 3, fontStyle=bold, foreground=Color {7, 54, 66, 255}}, " + "StyleRange {3, 1, fontStyle=normal}, " + "StyleRange {4, 1, fontStyle=normal, foreground=Color {38, 139, 210, 255}}, " @@ -66,7 +66,7 @@ void colorizeTypescript() throws Exception { command.getStyleRanges()); } - @Disabled ("Remove this annotation when org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed] will be fixed") + @Disabled("Remove this annotation when org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed] will be fixed") @Test void colorizeTypescriptWithInvalidate1() throws Exception { @@ -76,8 +76,7 @@ void colorizeTypescriptWithInvalidate1() throws Exception { // document.set("let a = '';\nlet b = 10;\nlet c = true;"); final ICommand command0 = commands.get(0); - assertEquals( - "[" + assertEquals("[" + "StyleRange {0, 3, fontStyle=bold, foreground=Color {7, 54, 66, 255}}, " + "StyleRange {3, 1, fontStyle=normal}, " + "StyleRange {4, 1, fontStyle=normal, foreground=Color {38, 139, 210, 255}}, " @@ -107,8 +106,7 @@ void colorizeTypescriptWithInvalidate1() throws Exception { // viewer.invalidateTextPresentation(0, 3); final ICommand command1 = commands.get(1); - assertEquals( - "[" + assertEquals("[" + "StyleRange {0, 3, fontStyle=bold, foreground=Color {7, 54, 66, 255}}" + "]", command1.getStyleRanges()); @@ -125,8 +123,7 @@ void colorizeTypescriptWithInvalidate2() throws Exception { // document.set("let a = '';\nlet b = 10;\nlet c = true;"); final ICommand command0 = commands.get(0); - assertEquals( - "[" + assertEquals("[" + "StyleRange {0, 3, fontStyle=bold, foreground=Color {7, 54, 66, 255}}, " + "StyleRange {3, 1, fontStyle=normal}, " + "StyleRange {4, 1, fontStyle=normal, foreground=Color {38, 139, 210, 255}}, " @@ -158,13 +155,13 @@ void colorizeTypescriptWithInvalidate2() throws Exception { final ICommand command1 = commands.get(1); assertEquals( "[" - + "StyleRange {0, 2, fontStyle=bold, foreground=Color {7, 54, 66, 255}}" - + "]", + + "StyleRange {0, 2, fontStyle=bold, foreground=Color {7, 54, 66, 255}}" + + "]", command1.getStyleRanges()); } - @Disabled ("Remove this annotation when org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed] will be fixed") + @Disabled("Remove this annotation when org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed] will be fixed") @Test void colorizeTypescriptWithInvalidate3() throws Exception { @@ -174,8 +171,7 @@ void colorizeTypescriptWithInvalidate3() throws Exception { // document.set("let a = '';\nlet b = 10;\nlet c = true;"); final ICommand command0 = commands.get(0); - assertEquals( - "[" + assertEquals("[" + "StyleRange {0, 3, fontStyle=bold, foreground=Color {7, 54, 66, 255}}, " + "StyleRange {3, 1, fontStyle=normal}, " + "StyleRange {4, 1, fontStyle=normal, foreground=Color {38, 139, 210, 255}}, " @@ -207,8 +203,8 @@ void colorizeTypescriptWithInvalidate3() throws Exception { final ICommand command1 = commands.get(1); assertEquals( "[" - + "StyleRange {1, 2, fontStyle=bold, foreground=Color {7, 54, 66, 255}}" - + "]", + + "StyleRange {1, 2, fontStyle=bold, foreground=Color {7, 54, 66, 255}}" + + "]", command1.getStyleRanges()); } @@ -223,8 +219,7 @@ void colorizeTypescriptWithInvalidate4() throws Exception { // document.set("let a = '';\nlet b = 10;\nlet c = true;"); final ICommand command0 = commands.get(0); - assertEquals( - "[" + assertEquals("[" + "StyleRange {0, 3, fontStyle=bold, foreground=Color {7, 54, 66, 255}}, " + "StyleRange {3, 1, fontStyle=normal}, " + "StyleRange {4, 1, fontStyle=normal, foreground=Color {38, 139, 210, 255}}, " @@ -254,8 +249,7 @@ void colorizeTypescriptWithInvalidate4() throws Exception { // viewer.invalidateTextPresentation(1, 1); final ICommand command1 = commands.get(1); - assertEquals( - "[" + assertEquals("[" + "StyleRange {1, 1, fontStyle=bold, foreground=Color {7, 54, 66, 255}}" + "]", command1.getStyleRanges()); @@ -272,8 +266,7 @@ void colorizeTypescriptWithInvalidate8() throws Exception { // document.set("let a = '';\nlet b = 10;\nlet c = true;"); final ICommand command0 = commands.get(0); - assertEquals( - "[" + assertEquals("[" + "StyleRange {0, 3, fontStyle=bold, foreground=Color {7, 54, 66, 255}}, " + "StyleRange {3, 1, fontStyle=normal}, " + "StyleRange {4, 1, fontStyle=normal, foreground=Color {38, 139, 210, 255}}, " @@ -303,15 +296,14 @@ void colorizeTypescriptWithInvalidate8() throws Exception { // viewer.invalidateTextPresentation(1, 8); final ICommand command1 = commands.get(1); - assertEquals( - "[" + assertEquals("[" + "StyleRange {1, 2, fontStyle=bold, foreground=Color {7, 54, 66, 255}}" + "]", command1.getStyleRanges()); } - @Disabled ("Remove this annotation when org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed] will be fixed") + @Disabled("Remove this annotation when org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed] will be fixed") @Test void colorizeTypescriptWithInvalidateAndSeveralLines() throws Exception { @@ -323,8 +315,7 @@ void colorizeTypescriptWithInvalidateAndSeveralLines() throws Exception { assertEquals(2, commands.size()); for (final ICommand command : commands) { - assertEquals( - "[" + assertEquals("[" + "StyleRange {0, 3, fontStyle=normal, foreground=Color {38, 139, 210, 255}}, " + "StyleRange {3, 2, fontStyle=normal}, " + "StyleRange {5, 1, fontStyle=normal, foreground=Color {38, 139, 210, 255}}" @@ -338,10 +329,9 @@ private static ITokenProvider getTokenProvider() { } public static IGrammar getGrammar() { - final var registry = new Registry(); try { - return registry.loadGrammarFromPathSync("TypeScript.tmLanguage.json", - TMPresentationReconcilerTypeScriptTest.class.getClassLoader().getResourceAsStream("/grammars/TypeScript.tmLanguage.json")); + return new Registry().addGrammar(IGrammarSource.fromResource(TMPresentationReconcilerTypeScriptTest.class, + "/grammars/TypeScript.tmLanguage.json")); } catch (final Exception e) { e.printStackTrace(); return null; diff --git a/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/wizards/SelectGrammarWizardPage.java b/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/wizards/SelectGrammarWizardPage.java index b50a79ef5..cb05e3c97 100644 --- a/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/wizards/SelectGrammarWizardPage.java +++ b/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/wizards/SelectGrammarWizardPage.java @@ -13,7 +13,7 @@ import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*; -import java.io.FileInputStream; +import java.nio.file.Paths; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; @@ -31,6 +31,7 @@ import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Text; import org.eclipse.tm4e.core.grammar.IGrammar; +import org.eclipse.tm4e.core.registry.IGrammarSource; import org.eclipse.tm4e.core.registry.Registry; import org.eclipse.tm4e.registry.GrammarDefinition; import org.eclipse.tm4e.registry.IGrammarDefinition; @@ -148,12 +149,8 @@ protected IStatus validatePage(final Event event) { TMUIMessages.SelectGrammarWizardPage_file_error_required); } final var registry = new Registry(); - try (var is = new FileInputStream(path)) { - final IGrammar grammar = registry.loadGrammarFromPathSync(path, is); - if (grammar == null) { - return new Status(IStatus.ERROR, TMUIPlugin.PLUGIN_ID, - TMUIMessages.SelectGrammarWizardPage_file_error_invalid); - } + try { + final IGrammar grammar = registry.addGrammar(IGrammarSource.fromFile(Paths.get(path))); grammarInfoWidget.refresh(grammar); } catch (final Exception e) { return new Status(IStatus.ERROR, TMUIPlugin.PLUGIN_ID, From 5132373d995bbca93149ca5e03cc8856576662aa Mon Sep 17 00:00:00 2001 From: sebthom Date: Tue, 17 May 2022 12:46:14 +0200 Subject: [PATCH 25/41] Rename classes according upstream project --- .../core/grammar/internal/RawTestImpl.java | 8 +- .../internal/theme/ThemeMatchingTest.java | 28 ++-- org.eclipse.tm4e.core/META-INF/MANIFEST.MF | 1 + .../eclipse/tm4e/core/grammar/IGrammar.java | 4 +- .../{IStackElement.java => IStateStack.java} | 6 +- .../core/grammar/ITokenizeLineResult.java | 2 +- .../core/grammar/ITokenizeLineResult2.java | 2 +- ...Element.java => AttributedScopeStack.java} | 37 ++--- ...etadata.java => BasicScopeAttributes.java} | 4 +- ...java => BasicScopeAttributesProvider.java} | 27 ++-- .../tm4e/core/internal/grammar/Grammar.java | 29 ++-- .../core/internal/grammar/LineTokenizer.java | 38 +++--- .../core/internal/grammar/LineTokens.java | 14 +- .../internal/grammar/LocalStackElement.java | 4 +- .../grammar/StackElementMetadata.java | 83 ------------ .../{StackElement.java => StateStack.java} | 52 ++++---- .../internal/grammar/TokenizeLineResult.java | 6 +- .../internal/grammar/TokenizeLineResult2.java | 6 +- .../tokenattrs/EncodedTokenAttributes.java | 85 ++++++++++++ .../EncodedTokenDataConsts.java} | 6 +- .../OptionalStandardTokenType.java | 14 +- .../{ => tokenattrs}/StandardTokenType.java | 2 +- .../grammar/tokenattrs/package-info.java | 4 + .../org/eclipse/tm4e/core/model/TMState.java | 10 +- .../tm4e/core/benchmark/GrammarBenchmark.java | 4 +- .../tm4e/core/grammar/GrammarTest.java | 2 +- .../tm4e/core/grammar/GrammarTest2.java | 2 +- .../eclipse/tm4e/core/grammar/MarkDown.java | 2 +- .../tm4e/core/grammar/TokenizationUtils.java | 4 +- .../grammar/StackElementMetadataTest.java | 123 ----------------- .../EncodedTokenAttributesTest.java | 126 ++++++++++++++++++ 31 files changed, 375 insertions(+), 360 deletions(-) rename org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/{IStackElement.java => IStateStack.java} (87%) rename org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/{ScopeListElement.java => AttributedScopeStack.java} (71%) rename org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/{ScopeMetadata.java => BasicScopeAttributes.java} (88%) rename org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/{ScopeMetadataProvider.java => BasicScopeAttributesProvider.java} (81%) delete mode 100644 org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StackElementMetadata.java rename org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/{StackElement.java => StateStack.java} (81%) create mode 100644 org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributes.java rename org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/{MetadataConsts.java => tokenattrs/EncodedTokenDataConsts.java} (93%) rename org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/{ => tokenattrs}/OptionalStandardTokenType.java (68%) rename org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/{ => tokenattrs}/StandardTokenType.java (91%) create mode 100644 org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/package-info.java delete mode 100644 org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/StackElementMetadataTest.java create mode 100644 org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributesTest.java diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawTestImpl.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawTestImpl.java index 1a32c9ae6..1a6694e57 100644 --- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawTestImpl.java +++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawTestImpl.java @@ -22,7 +22,7 @@ import java.util.List; import org.eclipse.tm4e.core.grammar.IGrammar; -import org.eclipse.tm4e.core.grammar.IStackElement; +import org.eclipse.tm4e.core.grammar.IStateStack; import org.eclipse.tm4e.core.registry.IGrammarSource; import org.eclipse.tm4e.core.registry.IRegistryOptions; import org.eclipse.tm4e.core.registry.Registry; @@ -90,7 +90,7 @@ public Collection getInjections(final String scopeName) { throw new Exception("I HAVE NO GRAMMAR FOR TEST"); } - IStackElement prevState = null; + IStateStack prevState = null; for (final var testLine : lines) { prevState = assertLineTokenization(grammar, testLine, prevState); } @@ -108,8 +108,8 @@ private IGrammar getGrammar(final Registry registry, final File testLocation) th return grammar; } - private static IStackElement assertLineTokenization(final IGrammar grammar, final RawTestLine testCase, - final IStackElement prevState) { + private static IStateStack assertLineTokenization(final IGrammar grammar, final RawTestLine testCase, + final IStateStack prevState) { final var line = testCase.line; final var actual = grammar.tokenizeLine(line, prevState); diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java index 1845019e5..8c23ef1ea 100644 --- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java +++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java @@ -14,9 +14,9 @@ import static org.eclipse.tm4e.core.internal.theme.FontStyle.*; import static org.junit.jupiter.api.Assertions.*; -import org.eclipse.tm4e.core.internal.grammar.ScopeListElement; -import org.eclipse.tm4e.core.internal.grammar.ScopeMetadata; -import org.eclipse.tm4e.core.internal.grammar.StackElementMetadata; +import org.eclipse.tm4e.core.internal.grammar.AttributedScopeStack; +import org.eclipse.tm4e.core.internal.grammar.BasicScopeAttributes; +import org.eclipse.tm4e.core.internal.grammar.tokenattrs.EncodedTokenAttributes; import org.junit.jupiter.api.Test; /** @@ -87,12 +87,12 @@ void testGivesHigherPriorityToParentMatches2() throws Exception { { "scope": "entity", "settings": { "foreground": "#500000" } } ]}"""); - final var root = new ScopeListElement(null, "text.html.cshtml", 0); - final var parent = new ScopeListElement(root, "meta.tag.structure.any.html", 0); - final int r = ScopeListElement.mergeMetadata(0, parent, - new ScopeMetadata("entity.name.tag.structure.any.html", 0, 0, + final var root = new AttributedScopeStack(null, "text.html.cshtml", 0); + final var parent = new AttributedScopeStack(root, "meta.tag.structure.any.html", 0); + final int r = AttributedScopeStack.mergeMetadata(0, parent, + new BasicScopeAttributes("entity.name.tag.structure.any.html", 0, 0, theme.match("entity.name.tag.structure.any.html"))); - final String color = theme.getColor(StackElementMetadata.getForeground(r)); + final String color = theme.getColor(EncodedTokenAttributes.getForeground(r)); assertEquals("#300000", color); } @@ -227,15 +227,15 @@ void testMicrosoft_vscode_23460() throws Exception { new ThemeTrieElementRule(4, list("meta.structure.dictionary.json"), NotSet, _D, _NOT_SET), new ThemeTrieElementRule(0, null, NotSet, _NOT_SET, _NOT_SET)); - final var parent3 = new ScopeListElement(null, "source.json", 0); - final var parent2 = new ScopeListElement(parent3, "meta.structure.dictionary.json", 0); - final var parent1 = new ScopeListElement(parent2, "meta.structure.dictionary.value.json", 0); + final var parent3 = new AttributedScopeStack(null, "source.json", 0); + final var parent2 = new AttributedScopeStack(parent3, "meta.structure.dictionary.json", 0); + final var parent1 = new AttributedScopeStack(parent2, "meta.structure.dictionary.value.json", 0); - final int r = ScopeListElement.mergeMetadata( + final int r = AttributedScopeStack.mergeMetadata( 0, parent1, - new ScopeMetadata("string.quoted.double.json", 0, 0, theme.match("string.quoted.double.json"))); - final String color = theme.getColor(StackElementMetadata.getForeground(r)); + new BasicScopeAttributes("string.quoted.double.json", 0, 0, theme.match("string.quoted.double.json"))); + final String color = theme.getColor(EncodedTokenAttributes.getForeground(r)); assertEquals("#FF410D", color); } diff --git a/org.eclipse.tm4e.core/META-INF/MANIFEST.MF b/org.eclipse.tm4e.core/META-INF/MANIFEST.MF index 76dc24439..b01eb74dd 100644 --- a/org.eclipse.tm4e.core/META-INF/MANIFEST.MF +++ b/org.eclipse.tm4e.core/META-INF/MANIFEST.MF @@ -19,6 +19,7 @@ Bundle-RequiredExecutionEnvironment: JavaSE-17 Export-Package: org.eclipse.tm4e.core, org.eclipse.tm4e.core.grammar, org.eclipse.tm4e.core.internal.grammar;x-friends:="org.eclipse.tm4e.core.tests", + org.eclipse.tm4e.core.internal.grammar.tokenattrs;x-friends:="org.eclipse.tm4e.core.tests", org.eclipse.tm4e.core.internal.matcher;x-friends:="org.eclipse.tm4e.core.tests", org.eclipse.tm4e.core.internal.theme;x-friends:="org.eclipse.tm4e.core.tests", org.eclipse.tm4e.core.internal.theme.reader;x-friends:="org.eclipse.tm4e.core.tests", diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IGrammar.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IGrammar.java index f9ddaf457..0e79366ab 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IGrammar.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IGrammar.java @@ -69,7 +69,7 @@ public interface IGrammar { * previous line state. * @return the result of the tokenization. */ - ITokenizeLineResult tokenizeLine(String lineText, @Nullable IStackElement prevState); + ITokenizeLineResult tokenizeLine(String lineText, @Nullable IStateStack prevState); /** * Tokenize `lineText` using previous line state `prevState`. @@ -93,6 +93,6 @@ public interface IGrammar { * - background color * e.g. for getting the languageId: `(metadata & MetadataConsts.LANGUAGEID_MASK) >>> MetadataConsts.LANGUAGEID_OFFSET` */ - ITokenizeLineResult2 tokenizeLine2(String lineText, @Nullable IStackElement prevState); + ITokenizeLineResult2 tokenizeLine2(String lineText, @Nullable IStateStack prevState); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IStackElement.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IStateStack.java similarity index 87% rename from org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IStackElement.java rename to org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IStateStack.java index fb7143d6d..c77d268f6 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IStackElement.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IStateStack.java @@ -16,7 +16,7 @@ */ package org.eclipse.tm4e.core.grammar; -import org.eclipse.tm4e.core.internal.grammar.StackElement; +import org.eclipse.tm4e.core.internal.grammar.StateStack; /** * Represents a "pushed" state on the stack (as a linked list element). @@ -25,8 +25,8 @@ * "https://github.com/microsoft/vscode-textmate/blob/9157c7f869219dbaf9a5a5607f099c00fe694a29/src/main.ts#L244"> * github.com/Microsoft/vscode-textmate/blob/master/src/main.ts */ -public interface IStackElement { - IStackElement INITIAL = StackElement.NULL; +public interface IStateStack { + IStateStack INITIAL = StateStack.NULL; int getDepth(); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult.java index 5e51122fe..ccc80165d 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult.java @@ -31,5 +31,5 @@ public interface ITokenizeLineResult { * * @return the `prevState` to be passed on to the next line tokenization. */ - IStackElement getRuleStack(); + IStateStack getRuleStack(); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult2.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult2.java index 3dce2c5dc..899a5648c 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult2.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult2.java @@ -36,5 +36,5 @@ public interface ITokenizeLineResult2 { * * @return the `prevState` to be passed on to the next line tokenization. */ - IStackElement getRuleStack(); + IStateStack getRuleStack(); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/ScopeListElement.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/AttributedScopeStack.java similarity index 71% rename from org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/ScopeListElement.java rename to org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/AttributedScopeStack.java index 0ecd4f280..b3e98fb42 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/ScopeListElement.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/AttributedScopeStack.java @@ -17,6 +17,7 @@ import java.util.Objects; import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.tm4e.core.internal.grammar.tokenattrs.EncodedTokenAttributes; import org.eclipse.tm4e.core.internal.theme.FontStyle; import org.eclipse.tm4e.core.internal.theme.ThemeTrieElementRule; @@ -28,22 +29,22 @@ * https://github.com/Microsoft/vscode-textmate/blob/main/src/grammar.ts * */ -public final class ScopeListElement { +public final class AttributedScopeStack { private static final Splitter BY_SPACE_SPLITTER = Splitter.on(' '); @Nullable - private final ScopeListElement parent; + private final AttributedScopeStack parent; private final String scope; final int metadata; - public ScopeListElement(@Nullable final ScopeListElement parent, final String scope, final int metadata) { + public AttributedScopeStack(@Nullable final AttributedScopeStack parent, final String scope, final int metadata) { this.parent = parent; this.scope = scope; this.metadata = metadata; } - private static boolean structuralEquals(@Nullable ScopeListElement a, @Nullable ScopeListElement b) { + private static boolean structuralEquals(@Nullable AttributedScopeStack a, @Nullable AttributedScopeStack b) { do { if (a == b) { return true; @@ -69,7 +70,7 @@ private static boolean structuralEquals(@Nullable ScopeListElement a, @Nullable } while (true); } - private static boolean equals(@Nullable final ScopeListElement a, @Nullable final ScopeListElement b) { + private static boolean equals(@Nullable final AttributedScopeStack a, @Nullable final AttributedScopeStack b) { if (a == b) { return true; } @@ -81,10 +82,10 @@ private static boolean equals(@Nullable final ScopeListElement a, @Nullable fina @Override public boolean equals(@Nullable final Object other) { - if (other == null || other.getClass() != ScopeListElement.class) { + if (other == null || other.getClass() != AttributedScopeStack.class) { return false; } - return equals(this, (ScopeListElement) other); + return equals(this, (AttributedScopeStack) other); } @Override @@ -99,7 +100,7 @@ private static boolean matchesScope(final String scope, final String selector, f /** * implementation differs from upstream in that it is prevents potential NPEs/IndexOutOfBoundExceptions */ - private static boolean matches(@Nullable ScopeListElement target, @Nullable final List parentScopes) { + private static boolean matches(@Nullable AttributedScopeStack target, @Nullable final List parentScopes) { if (parentScopes == null || parentScopes.isEmpty()) { return true; } @@ -126,8 +127,8 @@ private static boolean matches(@Nullable ScopeListElement target, @Nullable fina return true; } - public static int mergeMetadata(final int metadata, @Nullable final ScopeListElement scopesList, - @Nullable final ScopeMetadata source) { + public static int mergeMetadata(final int metadata, @Nullable final AttributedScopeStack scopesList, + @Nullable final BasicScopeAttributes source) { if (source == null) { return metadata; } @@ -148,29 +149,29 @@ public static int mergeMetadata(final int metadata, @Nullable final ScopeListEle } } - return StackElementMetadata.set(metadata, source.languageId, source.tokenType, null, fontStyle, foreground, + return EncodedTokenAttributes.set(metadata, source.languageId, source.tokenType, null, fontStyle, foreground, background); } - private static ScopeListElement push(ScopeListElement target, final Grammar grammar, + private static AttributedScopeStack push(AttributedScopeStack target, final Grammar grammar, final Iterable scopes) { for (final String scope : scopes) { final var rawMetadata = grammar.getMetadataForScope(scope); - final int metadata = ScopeListElement.mergeMetadata(target.metadata, target, rawMetadata); - target = new ScopeListElement(target, scope, metadata); + final int metadata = AttributedScopeStack.mergeMetadata(target.metadata, target, rawMetadata); + target = new AttributedScopeStack(target, scope, metadata); } return target; } - ScopeListElement push(final Grammar grammar, @Nullable final String scope) { + AttributedScopeStack push(final Grammar grammar, @Nullable final String scope) { if (scope == null) { return this; } - return ScopeListElement.push(this, grammar, BY_SPACE_SPLITTER.split(scope)); + return AttributedScopeStack.push(this, grammar, BY_SPACE_SPLITTER.split(scope)); } - private static List generateScopes(@Nullable ScopeListElement scopesList) { + private static List generateScopes(@Nullable AttributedScopeStack scopesList) { final var result = new ArrayList(); while (scopesList != null) { result.add(scopesList.scope); @@ -181,6 +182,6 @@ private static List generateScopes(@Nullable ScopeListElement scopesList } List generateScopes() { - return ScopeListElement.generateScopes(this); + return AttributedScopeStack.generateScopes(this); } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/ScopeMetadata.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributes.java similarity index 88% rename from org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/ScopeMetadata.java rename to org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributes.java index 9c66f1652..70f5f8b55 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/ScopeMetadata.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributes.java @@ -16,7 +16,7 @@ import org.eclipse.jdt.annotation.Nullable; import org.eclipse.tm4e.core.internal.theme.ThemeTrieElementRule; -public final class ScopeMetadata { +public final class BasicScopeAttributes { final String scopeName; final int languageId; @@ -25,7 +25,7 @@ public final class ScopeMetadata { @Nullable final List themeData; - public ScopeMetadata(final String scopeName, final int languageId, + public BasicScopeAttributes(final String scopeName, final int languageId, final int /*OptionalStandardTokenType*/ tokenType, @Nullable final List themeData) { this.scopeName = scopeName; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/ScopeMetadataProvider.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java similarity index 81% rename from org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/ScopeMetadataProvider.java rename to org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java index e3cdab1f3..4e3e59646 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/ScopeMetadataProvider.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java @@ -20,6 +20,7 @@ import org.eclipse.jdt.annotation.Nullable; import org.eclipse.tm4e.core.TMException; +import org.eclipse.tm4e.core.internal.grammar.tokenattrs.OptionalStandardTokenType; import org.eclipse.tm4e.core.internal.theme.IThemeProvider; import org.eclipse.tm4e.core.internal.theme.ThemeTrieElementRule; import org.eclipse.tm4e.core.internal.utils.RegexSource; @@ -29,9 +30,9 @@ * "https://github.com/microsoft/vscode-textmate/blob/9157c7f869219dbaf9a5a5607f099c00fe694a29/src/grammar.ts#L320"> * github.com/Microsoft/vscode-textmate/blob/master/src/grammar.ts */ -final class ScopeMetadataProvider { +final class BasicScopeAttributesProvider { - private static final ScopeMetadata NULL_SCOPE_METADATA = new ScopeMetadata("", 0, 0, null); + private static final BasicScopeAttributes NULL_SCOPE_METADATA = new BasicScopeAttributes("", 0, 0, null); private static final Pattern STANDARD_TOKEN_TYPE_REGEXP = Pattern.compile("\\b(comment|string|regex)\\b"); private static final String COMMENT_TOKEN_TYPE = "comment"; @@ -41,20 +42,20 @@ final class ScopeMetadataProvider { private final int initialLanguage; private final IThemeProvider themeProvider; - private final Map cache = new HashMap<>(); + private final Map cache = new HashMap<>(); - private ScopeMetadata defaultMetaData; + private BasicScopeAttributes defaultMetaData; private final Map embeddedLanguages = new HashMap<>(); @Nullable private Pattern embeddedLanguagesRegex; - ScopeMetadataProvider(final int initialLanguage, final IThemeProvider themeProvider, + BasicScopeAttributesProvider(final int initialLanguage, final IThemeProvider themeProvider, @Nullable final Map embeddedLanguages) { this.initialLanguage = initialLanguage; this.themeProvider = themeProvider; - this.defaultMetaData = new ScopeMetadata( + this.defaultMetaData = new BasicScopeAttributes( "", this.initialLanguage, OptionalStandardTokenType.NotSet, @@ -82,20 +83,20 @@ final class ScopeMetadataProvider { void onDidChangeTheme() { this.cache.clear(); - this.defaultMetaData = new ScopeMetadata( + this.defaultMetaData = new BasicScopeAttributes( "", this.initialLanguage, OptionalStandardTokenType.NotSet, List.of(this.themeProvider.getDefaults())); } - ScopeMetadata getDefaultMetadata() { + BasicScopeAttributes getDefaultMetadata() { return this.defaultMetaData; } - ScopeMetadata getMetadataForScope(@Nullable final String scopeName) { + BasicScopeAttributes getMetadataForScope(@Nullable final String scopeName) { if (scopeName == null) { - return ScopeMetadataProvider.NULL_SCOPE_METADATA; + return BasicScopeAttributesProvider.NULL_SCOPE_METADATA; } var value = this.cache.get(scopeName); if (value != null) { @@ -106,12 +107,12 @@ ScopeMetadata getMetadataForScope(@Nullable final String scopeName) { return value; } - private ScopeMetadata doGetMetadataForScope(final String scopeName) { + private BasicScopeAttributes doGetMetadataForScope(final String scopeName) { final int languageId = this.scopeToLanguage(scopeName); - final int standardTokenType = ScopeMetadataProvider.toStandardTokenType(scopeName); + final int standardTokenType = BasicScopeAttributesProvider.toStandardTokenType(scopeName); final List themeData = this.themeProvider.themeMatch(scopeName); - return new ScopeMetadata(scopeName, languageId, standardTokenType, themeData); + return new BasicScopeAttributes(scopeName, languageId, standardTokenType, themeData); } /** diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java index 5fff31bba..cb286fc6d 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java @@ -30,9 +30,10 @@ import org.eclipse.jdt.annotation.Nullable; import org.eclipse.tm4e.core.grammar.IGrammar; -import org.eclipse.tm4e.core.grammar.IStackElement; +import org.eclipse.tm4e.core.grammar.IStateStack; import org.eclipse.tm4e.core.grammar.ITokenizeLineResult; import org.eclipse.tm4e.core.grammar.ITokenizeLineResult2; +import org.eclipse.tm4e.core.internal.grammar.tokenattrs.EncodedTokenAttributes; import org.eclipse.tm4e.core.internal.matcher.Matcher; import org.eclipse.tm4e.core.internal.oniguruma.OnigString; import org.eclipse.tm4e.core.internal.registry.IGrammarRepository; @@ -68,7 +69,7 @@ public final class Grammar implements IGrammar, IRuleFactoryHelper { @Nullable private List injections; - private final ScopeMetadataProvider scopeMetadataProvider; + private final BasicScopeAttributesProvider scopeMetadataProvider; private final List tokenTypeMatchers = new ArrayList<>(); @Nullable @@ -85,7 +86,7 @@ public Grammar( final IThemeProvider themeProvider) { this.rootScopeName = rootScopeName; - this.scopeMetadataProvider = new ScopeMetadataProvider(initialLanguage, themeProvider, embeddedLanguages); + this.scopeMetadataProvider = new BasicScopeAttributesProvider(initialLanguage, themeProvider, embeddedLanguages); this.grammarRepository = grammarRepository; this.grammar = initGrammar(grammar, null); this.balancedBracketSelectors = balancedBracketSelectors; @@ -105,7 +106,7 @@ public void onDidChangeTheme() { this.scopeMetadataProvider.onDidChangeTheme(); } - ScopeMetadata getMetadataForScope(final String scope) { + BasicScopeAttributes getMetadataForScope(final String scope) { return this.scopeMetadataProvider.getMetadataForScope(scope); } @@ -255,8 +256,8 @@ public ITokenizeLineResult tokenizeLine(final String lineText) { } @Override - public ITokenizeLineResult tokenizeLine(final String lineText, @Nullable final IStackElement prevState) { - return _tokenize(lineText, (StackElement) prevState, false); + public ITokenizeLineResult tokenizeLine(final String lineText, @Nullable final IStateStack prevState) { + return _tokenize(lineText, (StateStack) prevState, false); } @Override @@ -265,14 +266,14 @@ public ITokenizeLineResult2 tokenizeLine2(final String lineText) { } @Override - public ITokenizeLineResult2 tokenizeLine2(final String lineText, @Nullable final IStackElement prevState) { - return _tokenize(lineText, (StackElement) prevState, true); + public ITokenizeLineResult2 tokenizeLine2(final String lineText, @Nullable final IStateStack prevState) { + return _tokenize(lineText, (StateStack) prevState, true); } @SuppressWarnings("unchecked") private T _tokenize( String lineText, - @Nullable StackElement prevState, + @Nullable StateStack prevState, final boolean emitBinaryTokens) { var rootId = this.rootId; if (rootId == null) { @@ -283,12 +284,12 @@ private T _tokenize( } boolean isFirstLine; - if (prevState == null || prevState.equals(StackElement.NULL)) { + if (prevState == null || prevState.equals(StateStack.NULL)) { isFirstLine = true; final var rawDefaultMetadata = this.scopeMetadataProvider.getDefaultMetadata(); final var themeData = rawDefaultMetadata.themeData; final var defaultTheme = themeData == null ? null : themeData.get(0); - final int defaultMetadata = StackElementMetadata.set( + final int defaultMetadata = EncodedTokenAttributes.set( 0, rawDefaultMetadata.languageId, rawDefaultMetadata.tokenType, @@ -300,16 +301,16 @@ private T _tokenize( final var rootScopeName = this.getRule(rootId).getName(null, null); final var rawRootMetadata = this.scopeMetadataProvider.getMetadataForScope(rootScopeName); - final int rootMetadata = ScopeListElement.mergeMetadata(defaultMetadata, null, rawRootMetadata); + final int rootMetadata = AttributedScopeStack.mergeMetadata(defaultMetadata, null, rawRootMetadata); - final var scopeList = new ScopeListElement( + final var scopeList = new AttributedScopeStack( null, rootScopeName == null ? "unknown" : rootScopeName, rootMetadata); - prevState = new StackElement( + prevState = new StateStack( null, rootId, -1, diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java index 84cfa52e7..3568fe1c6 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java @@ -58,12 +58,12 @@ private interface IMatchInjectionsResult extends IMatchResult { private static final class WhileCheckResult { - private final StackElement stack; + private final StateStack stack; private final int linePos; private final int anchorPosition; private final boolean isFirstLine; - private WhileCheckResult(final StackElement stack, final int linePos, final int anchorPosition, + private WhileCheckResult(final StateStack stack, final int linePos, final int anchorPosition, final boolean isFirstLine) { this.stack = stack; this.linePos = linePos; @@ -76,13 +76,13 @@ private WhileCheckResult(final StackElement stack, final int linePos, final int private final OnigString lineText; private boolean isFirstLine; private int linePos; - private StackElement stack; + private StateStack stack; private final LineTokens lineTokens; private int anchorPosition = -1; private boolean stop; private LineTokenizer(final Grammar grammar, final OnigString lineText, final boolean isFirstLine, - final int linePos, final StackElement stack, final LineTokens lineTokens) { + final int linePos, final StateStack stack, final LineTokens lineTokens) { this.grammar = grammar; this.lineText = lineText; this.isFirstLine = isFirstLine; @@ -91,7 +91,7 @@ private LineTokenizer(final Grammar grammar, final OnigString lineText, final bo this.lineTokens = lineTokens; } - private StackElement scan(final boolean checkWhileConditions) { + private StateStack scan(final boolean checkWhileConditions) { stop = false; if (checkWhileConditions) { @@ -167,10 +167,10 @@ private void scanNext() { lineTokens.produce(stack, captureIndices[0].start); - final StackElement beforePush = stack; + final StateStack beforePush = stack; // push it on the stack rule final String scopeName = rule.getName(lineText.content, captureIndices); - final ScopeListElement nameScopesList = stack.contentNameScopesList.push(grammar, scopeName); + final AttributedScopeStack nameScopesList = stack.contentNameScopesList.push(grammar, scopeName); stack = stack.push(matchedRuleId, linePos, anchorPosition, captureIndices[0].end == lineText.bytesCount, null, nameScopesList, nameScopesList); @@ -186,7 +186,7 @@ private void scanNext() { anchorPosition = captureIndices[0].end; final String contentName = pushedRule.getContentName(lineText.content, captureIndices); - final ScopeListElement contentNameScopesList = nameScopesList.push(grammar, contentName); + final AttributedScopeStack contentNameScopesList = nameScopesList.push(grammar, contentName); stack = stack.setContentNameScopesList(contentNameScopesList); if (pushedRule.endHasBackReferences) { @@ -214,7 +214,7 @@ private void scanNext() { anchorPosition = captureIndices[0].end; final String contentName = pushedRule.getContentName(lineText.content, captureIndices); - final ScopeListElement contentNameScopesList = nameScopesList.push(grammar, contentName); + final AttributedScopeStack contentNameScopesList = nameScopesList.push(grammar, contentName); stack = stack.setContentNameScopesList(contentNameScopesList); if (pushedRule.whileHasBackReferences) { @@ -266,7 +266,7 @@ private void scanNext() { @Nullable private IMatchResult matchRule(final Grammar grammar, final OnigString lineText, final boolean isFirstLine, - final int linePos, final StackElement stack, final int anchorPosition) { + final int linePos, final StateStack stack, final int anchorPosition) { final Rule rule = stack.getRule(grammar); final CompiledRule ruleScanner = rule.compileAG(grammar, stack.endRule, isFirstLine, linePos == anchorPosition); @@ -292,7 +292,7 @@ public OnigCaptureIndex[] getCaptureIndices() { @Nullable private IMatchResult matchRuleOrInjections(final Grammar grammar, final OnigString lineText, final boolean isFirstLine, - final int linePos, final StackElement stack, final int anchorPosition) { + final int linePos, final StateStack stack, final int anchorPosition) { // Look for normal grammar rule final IMatchResult matchResult = matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition); @@ -332,7 +332,7 @@ private IMatchResult matchRuleOrInjections(final Grammar grammar, final OnigStri @Nullable private IMatchInjectionsResult matchInjections(final List injections, final Grammar grammar, final OnigString lineText, - final boolean isFirstLine, final int linePos, final StackElement stack, final int anchorPosition) { + final boolean isFirstLine, final int linePos, final StateStack stack, final int anchorPosition) { // The lower the better int bestMatchRating = Integer.MAX_VALUE; OnigCaptureIndex[] bestMatchCaptureIndices = null; @@ -405,7 +405,7 @@ public boolean isPriorityMatch() { } private void handleCaptures(final Grammar grammar, final OnigString lineText, final boolean isFirstLine, - final StackElement stack, final LineTokens lineTokens, final List<@Nullable CaptureRule> captures, + final StateStack stack, final LineTokens lineTokens, final List<@Nullable CaptureRule> captures, final OnigCaptureIndex[] captureIndices) { if (captures.isEmpty()) { return; @@ -488,21 +488,21 @@ private void handleCaptures(final Grammar grammar, final OnigString lineText, fi * While conditions may also advance the linePosition. */ private WhileCheckResult checkWhileConditions(final Grammar grammar, final OnigString lineText, boolean isFirstLine, - int linePos, StackElement stack, final LineTokens lineTokens) { + int linePos, StateStack stack, final LineTokens lineTokens) { int anchorPosition = stack.beginRuleCapturedEOL ? 0 : -1; final class WhileStack { - final StackElement stack; + final StateStack stack; final BeginWhileRule rule; - WhileStack(final StackElement stack, final BeginWhileRule rule) { + WhileStack(final StateStack stack, final BeginWhileRule rule) { this.stack = stack; this.rule = rule; } } final var whileRules = new ArrayList(); - for (StackElement node = stack; node != null; node = node.pop()) { + for (StateStack node = stack; node != null; node = node.pop()) { final Rule nodeRule = node.getRule(grammar); if (nodeRule instanceof final BeginWhileRule beginWhileRule) { whileRules.add(new WhileStack(node, beginWhileRule)); @@ -547,8 +547,8 @@ final class WhileStack { return new WhileCheckResult(stack, linePos, anchorPosition, isFirstLine); } - static StackElement tokenizeString(final Grammar grammar, final OnigString lineText, final boolean isFirstLine, - final int linePos, final StackElement stack, final LineTokens lineTokens, + static StateStack tokenizeString(final Grammar grammar, final OnigString lineText, final boolean isFirstLine, + final int linePos, final StateStack stack, final LineTokens lineTokens, final boolean checkWhileConditions) { return new LineTokenizer(grammar, lineText, isFirstLine, linePos, stack, lineTokens).scan(checkWhileConditions); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java index 0e0786c48..22baffd1d 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java @@ -29,6 +29,8 @@ import org.eclipse.jdt.annotation.Nullable; import org.eclipse.tm4e.core.grammar.IToken; +import org.eclipse.tm4e.core.internal.grammar.tokenattrs.EncodedTokenAttributes; +import org.eclipse.tm4e.core.internal.grammar.tokenattrs.OptionalStandardTokenType; import org.eclipse.tm4e.core.internal.theme.FontStyle; final class LineTokens { @@ -77,11 +79,11 @@ final class LineTokens { this.balancedBracketSelectors = balancedBracketSelectors; } - void produce(final StackElement stack, final int endIndex) { + void produce(final StateStack stack, final int endIndex) { this.produceFromScopes(stack.contentNameScopesList, endIndex); } - void produceFromScopes(final ScopeListElement scopesList, final int endIndex) { + void produceFromScopes(final AttributedScopeStack scopesList, final int endIndex) { if (this.lastTokenEndIndex >= endIndex) { return; } @@ -100,7 +102,7 @@ void produceFromScopes(final ScopeListElement scopesList, final int endIndex) { final var scopes = scopesList.generateScopes(); for (final var tokenType : tokenTypeOverrides) { if (tokenType.matcher.matches(scopes)) { - metadata = StackElementMetadata.set( + metadata = EncodedTokenAttributes.set( metadata, 0, tokenType.type, // toOptionalTokenType(tokenType.type), @@ -116,7 +118,7 @@ void produceFromScopes(final ScopeListElement scopesList, final int endIndex) { } if (containsBalancedBrackets) { - metadata = StackElementMetadata.set( + metadata = EncodedTokenAttributes.set( metadata, 0, OptionalStandardTokenType.NotSet, @@ -172,7 +174,7 @@ void produceFromScopes(final ScopeListElement scopesList, final int endIndex) { this.lastTokenEndIndex = endIndex; } - IToken[] getResult(final StackElement stack, final int lineLength) { + IToken[] getResult(final StateStack stack, final int lineLength) { if (!this.tokens.isEmpty() && this.tokens.getLast().getStartIndex() == lineLength - 1) { // pop produced token for newline this.tokens.removeLast(); @@ -187,7 +189,7 @@ IToken[] getResult(final StackElement stack, final int lineLength) { return this.tokens.toArray(IToken[]::new); } - int[] getBinaryResult(final StackElement stack, final int lineLength) { + int[] getBinaryResult(final StateStack stack, final int lineLength) { if (!this.binaryTokens.isEmpty() && this.binaryTokens.get(binaryTokens.size() - 2) == lineLength - 1) { // pop produced token for newline removeLastElement(this.binaryTokens); diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LocalStackElement.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LocalStackElement.java index 7f67b97f0..81141fe66 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LocalStackElement.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LocalStackElement.java @@ -18,10 +18,10 @@ final class LocalStackElement { - final ScopeListElement scopes; + final AttributedScopeStack scopes; final int endPos; - LocalStackElement(final ScopeListElement scopes, final int endPos) { + LocalStackElement(final AttributedScopeStack scopes, final int endPos) { this.scopes = scopes; this.endPos = endPos; } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StackElementMetadata.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StackElementMetadata.java deleted file mode 100644 index 271686424..000000000 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StackElementMetadata.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright (c) 2015-2017 Angelo ZERR. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Angelo Zerr - initial API and implementation - */ -package org.eclipse.tm4e.core.internal.grammar; - -import org.eclipse.jdt.annotation.Nullable; -import org.eclipse.tm4e.core.internal.theme.FontStyle; - -/** - * Metadata for {@link StackElement}. - * - * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/metadata.ts - */ -public final class StackElementMetadata { - - /** - * Content should be referenced statically - */ - private StackElementMetadata() { - } - - static String toBinaryStr(final int metadata) { - return new StringBuilder(Integer.toBinaryString(metadata)) - .insert(0, "0".repeat(Integer.numberOfLeadingZeros(metadata))) - .toString(); - } - - static int getLanguageId(final int metadata) { - return (metadata & MetadataConsts.LANGUAGEID_MASK) >>> MetadataConsts.LANGUAGEID_OFFSET; - } - - static int getTokenType(final int metadata) { - return (metadata & MetadataConsts.TOKEN_TYPE_MASK) >>> MetadataConsts.TOKEN_TYPE_OFFSET; - } - - static boolean containsBalancedBrackets(final int metadata) { - return (metadata & MetadataConsts.BALANCED_BRACKETS_MASK) != 0; - } - - static int getFontStyle(final int metadata) { - return (metadata & MetadataConsts.FONT_STYLE_MASK) >>> MetadataConsts.FONT_STYLE_OFFSET; - } - - public static int getForeground(final int metadata) { - return (metadata & MetadataConsts.FOREGROUND_MASK) >>> MetadataConsts.FOREGROUND_OFFSET; - } - - static int getBackground(final int metadata) { - return (metadata & MetadataConsts.BACKGROUND_MASK) >>> MetadataConsts.BACKGROUND_OFFSET; - } - - /** - * Updates the fields in `metadata`. - * A value of `0`, `NotSet` or `null` indicates that the corresponding field should be left as is. - */ - static int set(final int metadata, final int languageId, final /*OptionalStandardTokenType*/ int tokenType, - @Nullable final Boolean containsBalancedBrackets, final int fontStyle, final int foreground, final int background) { - final var _languageId = languageId == 0 ? getLanguageId(metadata) : languageId; - final var _tokenType = tokenType == OptionalStandardTokenType.NotSet ? getTokenType(metadata) : tokenType; - final var _containsBalancedBracketsBit = (containsBalancedBrackets == null ? containsBalancedBrackets(metadata) - : containsBalancedBrackets) ? 1 : 0; - final var _fontStyle = fontStyle == FontStyle.NotSet ? getFontStyle(metadata) : fontStyle; - final var _foreground = foreground == 0 ? getForeground(metadata) : foreground; - final var _background = background == 0 ? getBackground(metadata) : background; - - return ((_languageId << MetadataConsts.LANGUAGEID_OFFSET) - | (_tokenType << MetadataConsts.TOKEN_TYPE_OFFSET) - | (_containsBalancedBracketsBit << MetadataConsts.BALANCED_BRACKETS_OFFSET) - | (_fontStyle << MetadataConsts.FONT_STYLE_OFFSET) - | (_foreground << MetadataConsts.FOREGROUND_OFFSET) - | (_background << MetadataConsts.BACKGROUND_OFFSET)) >>> 0; - } -} diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StackElement.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StateStack.java similarity index 81% rename from org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StackElement.java rename to org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StateStack.java index cd956968e..3c5d3d67f 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StackElement.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StateStack.java @@ -23,7 +23,7 @@ import java.util.Objects; import org.eclipse.jdt.annotation.Nullable; -import org.eclipse.tm4e.core.grammar.IStackElement; +import org.eclipse.tm4e.core.grammar.IStateStack; import org.eclipse.tm4e.core.internal.rule.IRuleRegistry; import org.eclipse.tm4e.core.internal.rule.Rule; import org.eclipse.tm4e.core.internal.rule.RuleId; @@ -35,10 +35,10 @@ * "https://github.com/microsoft/vscode-textmate/blob/9157c7f869219dbaf9a5a5607f099c00fe694a29/src/grammar.ts#L1347"> * github.com/Microsoft/vscode-textmate/blob/master/src/grammar.ts */ -public final class StackElement implements IStackElement { +public final class StateStack implements IStateStack { - public static final StackElement NULL = new StackElement(null, RuleId.NO_RULE, 0, 0, false, null, - new ScopeListElement(null, "", 0), new ScopeListElement(null, "", 0)); + public static final StateStack NULL = new StateStack(null, RuleId.NO_RULE, 0, 0, false, null, + new AttributedScopeStack(null, "", 0), new AttributedScopeStack(null, "", 0)); /** * The position on the current line where this state was pushed. @@ -58,7 +58,7 @@ public final class StackElement implements IStackElement { * The previous state on the stack (or null for the root state). */ @Nullable - final StackElement parent; + final StateStack parent; /** * The depth of the stack. @@ -84,23 +84,23 @@ public final class StackElement implements IStackElement { /** * The list of scopes containing the "name" for this state. */ - final ScopeListElement nameScopesList; + final AttributedScopeStack nameScopesList; /** * The list of scopes containing the "contentName" (besides "name") for this state. * This list **must** contain as an element `scopeName`. */ - final ScopeListElement contentNameScopesList; + final AttributedScopeStack contentNameScopesList; - StackElement( - @Nullable final StackElement parent, + StateStack( + @Nullable final StateStack parent, final RuleId ruleId, final int enterPos, final int anchorPos, final boolean beginRuleCapturedEOL, @Nullable final String endRule, - final ScopeListElement nameScopesList, - final ScopeListElement contentNameScopesList) { + final AttributedScopeStack nameScopesList, + final AttributedScopeStack contentNameScopesList) { this.parent = parent; depth = this.parent != null ? this.parent.depth + 1 : 1; this.ruleId = ruleId; @@ -115,7 +115,7 @@ public final class StackElement implements IStackElement { /** * A structural equals check. Does not take into account `scopes`. */ - private static boolean structuralEquals(@Nullable StackElement a, @Nullable StackElement b) { + private static boolean structuralEquals(@Nullable StateStack a, @Nullable StateStack b) { do { if (a == b) { return true; @@ -142,7 +142,7 @@ private static boolean structuralEquals(@Nullable StackElement a, @Nullable Stac } @SuppressWarnings("null") - private static boolean equals(@Nullable final StackElement a, @Nullable final StackElement b) { + private static boolean equals(@Nullable final StateStack a, @Nullable final StateStack b) { if (a == b) { return true; } @@ -154,10 +154,10 @@ private static boolean equals(@Nullable final StackElement a, @Nullable final St @Override public boolean equals(@Nullable final Object other) { - if (other == null || other.getClass() != StackElement.class) { + if (other == null || other.getClass() != StateStack.class) { return false; } - return equals(this, (StackElement) other); + return equals(this, (StateStack) other); } @Override @@ -175,7 +175,7 @@ public int hashCode() { } void reset() { - StackElement el = this; + StateStack el = this; while (el != null) { el.enterPosition = -1; el.anchorPos = -1; @@ -184,24 +184,24 @@ void reset() { } @Nullable - StackElement pop() { + StateStack pop() { return parent; } - StackElement safePop() { + StateStack safePop() { if (parent != null) return parent; return this; } - StackElement push(final RuleId ruleId, + StateStack push(final RuleId ruleId, final int enterPos, final int anchorPos, final boolean beginRuleCapturedEOL, @Nullable final String endRule, - final ScopeListElement nameScopesList, - final ScopeListElement contentNameScopesList) { - return new StackElement(this, + final AttributedScopeStack nameScopesList, + final AttributedScopeStack contentNameScopesList) { + return new StateStack(this, ruleId, enterPos, anchorPos, @@ -238,7 +238,7 @@ public String toString() { return '[' + String.join(", ", r) + ']'; } - StackElement setContentNameScopesList(final ScopeListElement contentNameScopesList) { + StateStack setContentNameScopesList(final AttributedScopeStack contentNameScopesList) { if (this.contentNameScopesList.equals(contentNameScopesList)) { return this; } @@ -251,11 +251,11 @@ StackElement setContentNameScopesList(final ScopeListElement contentNameScopesLi contentNameScopesList); } - StackElement setEndRule(final String endRule) { + StateStack setEndRule(final String endRule) { if (this.endRule != null && this.endRule.equals(endRule)) { return this; } - return new StackElement(this.parent, + return new StateStack(this.parent, this.ruleId, this.enterPosition, this.anchorPos, @@ -265,7 +265,7 @@ StackElement setEndRule(final String endRule) { this.contentNameScopesList); } - boolean hasSameRuleAs(final StackElement other) { + boolean hasSameRuleAs(final StateStack other) { var el = this; while (el != null && el.enterPosition == other.enterPosition) { if (el.ruleId == other.ruleId) { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineResult.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineResult.java index 574901605..3a3da371b 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineResult.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineResult.java @@ -25,9 +25,9 @@ final class TokenizeLineResult implements ITokenizeLineResult { private final IToken[] tokens; - private final StackElement ruleStack; + private final StateStack ruleStack; - TokenizeLineResult(final IToken[] tokens, final StackElement ruleStack) { + TokenizeLineResult(final IToken[] tokens, final StateStack ruleStack) { this.tokens = tokens; this.ruleStack = ruleStack; } @@ -38,7 +38,7 @@ public IToken[] getTokens() { } @Override - public StackElement getRuleStack() { + public StateStack getRuleStack() { return ruleStack; } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineResult2.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineResult2.java index c81759308..3ef93910d 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineResult2.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineResult2.java @@ -24,9 +24,9 @@ final class TokenizeLineResult2 implements ITokenizeLineResult2 { private final int[] tokens; - private final StackElement ruleStack; + private final StateStack ruleStack; - TokenizeLineResult2(final int[] tokens, final StackElement ruleStack) { + TokenizeLineResult2(final int[] tokens, final StateStack ruleStack) { this.tokens = tokens; this.ruleStack = ruleStack; } @@ -37,7 +37,7 @@ public int[] getTokens() { } @Override - public StackElement getRuleStack() { + public StateStack getRuleStack() { return ruleStack; } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributes.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributes.java new file mode 100644 index 000000000..d7c8de187 --- /dev/null +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributes.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) 2015-2017 Angelo ZERR. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Angelo Zerr - initial API and implementation + */ +package org.eclipse.tm4e.core.internal.grammar.tokenattrs; + +import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.tm4e.core.internal.grammar.StateStack; +import org.eclipse.tm4e.core.internal.theme.FontStyle; + +/** + * Metadata for {@link StateStack}. + * + * @see + * github.com/Microsoft/vscode-textmate/blob/master/src/metadata.ts + */ +public final class EncodedTokenAttributes { + + /** + * Content should be referenced statically + */ + private EncodedTokenAttributes() { + } + + public static String toBinaryStr(final int metadata) { + return new StringBuilder(Integer.toBinaryString(metadata)) + .insert(0, "0".repeat(Integer.numberOfLeadingZeros(metadata))) + .toString(); + } + + public static int getLanguageId(final int metadata) { + return (metadata & EncodedTokenDataConsts.LANGUAGEID_MASK) >>> EncodedTokenDataConsts.LANGUAGEID_OFFSET; + } + + public static int getTokenType(final int metadata) { + return (metadata & EncodedTokenDataConsts.TOKEN_TYPE_MASK) >>> EncodedTokenDataConsts.TOKEN_TYPE_OFFSET; + } + + public static boolean containsBalancedBrackets(final int metadata) { + return (metadata & EncodedTokenDataConsts.BALANCED_BRACKETS_MASK) != 0; + } + + public static int getFontStyle(final int metadata) { + return (metadata & EncodedTokenDataConsts.FONT_STYLE_MASK) >>> EncodedTokenDataConsts.FONT_STYLE_OFFSET; + } + + public static int getForeground(final int metadata) { + return (metadata & EncodedTokenDataConsts.FOREGROUND_MASK) >>> EncodedTokenDataConsts.FOREGROUND_OFFSET; + } + + public static int getBackground(final int metadata) { + return (metadata & EncodedTokenDataConsts.BACKGROUND_MASK) >>> EncodedTokenDataConsts.BACKGROUND_OFFSET; + } + + /** + * Updates the fields in `metadata`. + * A value of `0`, `NotSet` or `null` indicates that the corresponding field should be left as is. + */ + public static int set(final int metadata, final int languageId, final /*OptionalStandardTokenType*/ int tokenType, + @Nullable final Boolean containsBalancedBrackets, final int fontStyle, final int foreground, + final int background) { + final var _languageId = languageId == 0 ? getLanguageId(metadata) : languageId; + final var _tokenType = tokenType == OptionalStandardTokenType.NotSet ? getTokenType(metadata) : tokenType; + final var _containsBalancedBracketsBit = (containsBalancedBrackets == null ? containsBalancedBrackets(metadata) + : containsBalancedBrackets) ? 1 : 0; + final var _fontStyle = fontStyle == FontStyle.NotSet ? getFontStyle(metadata) : fontStyle; + final var _foreground = foreground == 0 ? getForeground(metadata) : foreground; + final var _background = background == 0 ? getBackground(metadata) : background; + + return (_languageId << EncodedTokenDataConsts.LANGUAGEID_OFFSET + | _tokenType << EncodedTokenDataConsts.TOKEN_TYPE_OFFSET + | _containsBalancedBracketsBit << EncodedTokenDataConsts.BALANCED_BRACKETS_OFFSET + | _fontStyle << EncodedTokenDataConsts.FONT_STYLE_OFFSET + | _foreground << EncodedTokenDataConsts.FOREGROUND_OFFSET + | _background << EncodedTokenDataConsts.BACKGROUND_OFFSET) >>> 0; + } +} diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/MetadataConsts.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenDataConsts.java similarity index 93% rename from org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/MetadataConsts.java rename to org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenDataConsts.java index 1a93039c5..a500a2bf5 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/MetadataConsts.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenDataConsts.java @@ -9,7 +9,7 @@ * Contributors: * Angelo Zerr - initial API and implementation */ -package org.eclipse.tm4e.core.internal.grammar; +package org.eclipse.tm4e.core.internal.grammar.tokenattrs; /** * Helpers to manage the "collapsed" metadata of an entire StackElement stack. @@ -36,12 +36,12 @@ * "https://github.com/microsoft/vscode-textmate/blob/master/src/metadata.ts"> * github.com/Microsoft/vscode-textmate/blob/master/src/metadata.ts */ -final class MetadataConsts { +final class EncodedTokenDataConsts { /** * content should be accessed statically */ - private MetadataConsts() { + private EncodedTokenDataConsts() { } static final int LANGUAGEID_MASK = 0b00000000000000000000000011111111; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/OptionalStandardTokenType.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/OptionalStandardTokenType.java similarity index 68% rename from org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/OptionalStandardTokenType.java rename to org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/OptionalStandardTokenType.java index b1139aefc..a61e23526 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/OptionalStandardTokenType.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/OptionalStandardTokenType.java @@ -15,12 +15,12 @@ * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license * - Sebastian Thomschke - translation and adaptation to Java */ -package org.eclipse.tm4e.core.internal.grammar; +package org.eclipse.tm4e.core.internal.grammar.tokenattrs; /** * Standard TextMate token type. */ -final class OptionalStandardTokenType { +public final class OptionalStandardTokenType { /** * Content should be accessed statically @@ -28,13 +28,13 @@ final class OptionalStandardTokenType { private OptionalStandardTokenType() { } - static final int Other = StandardTokenType.Other; - static final int Comment = StandardTokenType.Comment; - static final int String = StandardTokenType.String; - static final int RegEx = StandardTokenType.RegEx; + public static final int Other = StandardTokenType.Other; + public static final int Comment = StandardTokenType.Comment; + public static final int String = StandardTokenType.String; + public static final int RegEx = StandardTokenType.RegEx; /** * Indicates that no token type is set. */ - static final int NotSet = 8; + public static final int NotSet = 8; } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StandardTokenType.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/StandardTokenType.java similarity index 91% rename from org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StandardTokenType.java rename to org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/StandardTokenType.java index 914406d18..0c932e6a6 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StandardTokenType.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/StandardTokenType.java @@ -9,7 +9,7 @@ * Contributors: * Angelo Zerr - initial API and implementation */ -package org.eclipse.tm4e.core.internal.grammar; +package org.eclipse.tm4e.core.internal.grammar.tokenattrs; /** * Standard TextMate token type. diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/package-info.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/package-info.java new file mode 100644 index 000000000..270ab8f87 --- /dev/null +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/package-info.java @@ -0,0 +1,4 @@ +@NonNullByDefault +package org.eclipse.tm4e.core.internal.grammar.tokenattrs; + +import org.eclipse.jdt.annotation.NonNullByDefault; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/TMState.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/TMState.java index c7f5ffc60..51a24adfa 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/TMState.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/TMState.java @@ -19,7 +19,7 @@ import java.util.Objects; import org.eclipse.jdt.annotation.Nullable; -import org.eclipse.tm4e.core.grammar.IStackElement; +import org.eclipse.tm4e.core.grammar.IStateStack; public class TMState { @@ -27,19 +27,19 @@ public class TMState { private final TMState parentEmbedderState; @Nullable - private IStackElement ruleStack; + private IStateStack ruleStack; - public TMState(@Nullable final TMState parentEmbedderState, @Nullable final IStackElement ruleStatck) { + public TMState(@Nullable final TMState parentEmbedderState, @Nullable final IStateStack ruleStatck) { this.parentEmbedderState = parentEmbedderState; this.ruleStack = ruleStatck; } - public void setRuleStack(final IStackElement ruleStack) { + public void setRuleStack(final IStateStack ruleStack) { this.ruleStack = ruleStack; } @Nullable - public IStackElement getRuleStack() { + public IStateStack getRuleStack() { return ruleStack; } diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/benchmark/GrammarBenchmark.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/benchmark/GrammarBenchmark.java index 9564c086c..c2d907f3f 100644 --- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/benchmark/GrammarBenchmark.java +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/benchmark/GrammarBenchmark.java @@ -15,7 +15,7 @@ import java.util.Arrays; import org.eclipse.tm4e.core.grammar.IGrammar; -import org.eclipse.tm4e.core.grammar.IStackElement; +import org.eclipse.tm4e.core.grammar.IStateStack; import org.eclipse.tm4e.core.registry.IGrammarSource; import org.eclipse.tm4e.core.registry.Registry; @@ -57,7 +57,7 @@ public static void main(final String... args) throws Exception { */ @Override public void run() { - IStackElement state = null; + IStateStack state = null; for (final var line : sourceCode) { state = grammar.tokenizeLine(line, state).getRuleStack(); } diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest.java index e1efeac40..a903ec055 100644 --- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest.java +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest.java @@ -78,7 +78,7 @@ public void tokenizeLines() throws Exception { final var registry = new Registry(); final IGrammar grammar = registry.addGrammar(IGrammarSource.fromResource(Data.class, "JavaScript.tmLanguage")); - IStackElement ruleStack = null; + IStateStack ruleStack = null; int i = 0; int j = 0; final String[] lines = { "function add(a,b)", "{ return a+b; }" }; diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest2.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest2.java index 69bcaadc1..072bb13c8 100644 --- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest2.java +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest2.java @@ -34,7 +34,7 @@ void tokenizeLines() throws Exception { final var registry = new Registry(); final var grammar = registry.addGrammar(IGrammarSource.fromResource(Data.class, "JavaScript.tmLanguage")); - IStackElement ruleStack = null; + IStateStack ruleStack = null; int i = 0; final var lines = new ArrayList(); diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/MarkDown.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/MarkDown.java index f1458b16b..0a8deaeef 100644 --- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/MarkDown.java +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/MarkDown.java @@ -37,7 +37,7 @@ public static void main(final String[] args) throws Exception { final long start = System.currentTimeMillis(); - IStackElement ruleStack = null; + IStateStack ruleStack = null; int i = 0; for (final String line : lines) { final ITokenizeLineResult lineTokens = grammar.tokenizeLine(line, ruleStack); diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/TokenizationUtils.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/TokenizationUtils.java index 05abefa70..c1fdb9f0b 100644 --- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/TokenizationUtils.java +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/TokenizationUtils.java @@ -41,7 +41,7 @@ public static Stream tokenizeText(final CharSequence text, return BY_LINE_SPLITTER.splitToStream(text).map(new Function() { @Nullable - IStackElement prevStack; + IStateStack prevStack; @Override public ITokenizeLineResult apply(final String line) { @@ -66,7 +66,7 @@ public static Stream tokenizeText(final InputStream text, f final var reader = new BufferedReader(new InputStreamReader(text)); return reader.lines().map(new Function() { @Nullable - IStackElement prevStack; + IStateStack prevStack; @Override public ITokenizeLineResult apply(final String line) { diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/StackElementMetadataTest.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/StackElementMetadataTest.java deleted file mode 100644 index faccd3f37..000000000 --- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/StackElementMetadataTest.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Copyright (c) 2015-2017 Angelo ZERR. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Angelo Zerr - initial API and implementation - */ -package org.eclipse.tm4e.core.internal.grammar; - -import static org.eclipse.tm4e.core.internal.theme.FontStyle.*; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -/** - * {@link StackElementMetadata} tests same than vscode-textmate. - * - * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/tests/grammar.test.ts - */ -public class StackElementMetadataTest { - - @Test - public void testWorks() { - final int value = StackElementMetadata.set(0, 1, OptionalStandardTokenType.RegEx, null, Underline | Bold, 101, 102); - assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102); - } - - @Test - public void testCanOverwriteLanguageId() { - int value = StackElementMetadata.set(0, 1, OptionalStandardTokenType.RegEx, null, Underline | Bold, 101, 102); - assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102); - - value = StackElementMetadata.set(value, 2, OptionalStandardTokenType.NotSet, null, NotSet, 0, 0); - assertEquals(value, 2, StandardTokenType.RegEx, false, Underline | Bold, 101, 102); - } - - @Test - public void testCanOverwriteTokenType() { - int value = StackElementMetadata.set(0, 1, OptionalStandardTokenType.RegEx, null, Underline | Bold, 101, 102); - assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102); - - value = StackElementMetadata.set(value, 0, OptionalStandardTokenType.Comment, null, NotSet, 0, 0); - assertEquals(value, 1, StandardTokenType.Comment, false, Underline | Bold, 101, 102); - } - - @Test - public void testCanOverwriteFontStyle() { - int value = StackElementMetadata.set(0, 1, OptionalStandardTokenType.RegEx, null, Underline | Bold, 101, 102); - assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102); - - value = StackElementMetadata.set(value, 0, OptionalStandardTokenType.NotSet, null, None, 0, 0); - assertEquals(value, 1, StandardTokenType.RegEx, false, None, 101, 102); - } - - @Test - public void testCanOverwriteFontStyleWithStrikethrough() { - int value = StackElementMetadata.set(0, 1, OptionalStandardTokenType.RegEx, null, Strikethrough, 101, 102); - assertEquals(value, 1, StandardTokenType.RegEx, false, Strikethrough, 101, 102); - - value = StackElementMetadata.set(value, 0, OptionalStandardTokenType.NotSet, null, None, 0, 0); - assertEquals(value, 1, StandardTokenType.RegEx, false, None, 101, 102); - } - - @Test - public void testCanOverwriteForeground() { - int value = StackElementMetadata.set(0, 1, OptionalStandardTokenType.RegEx, null, Underline | Bold, 101, 102); - assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102); - - value = StackElementMetadata.set(value, 0, OptionalStandardTokenType.NotSet, null, NotSet, 5, 0); - assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 5, 102); - } - - @Test - public void testCanOverwriteBackground() { - int value = StackElementMetadata.set(0, 1, OptionalStandardTokenType.RegEx, null, Underline | Bold, 101, 102); - assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102); - - value = StackElementMetadata.set(value, 0, OptionalStandardTokenType.NotSet, null, NotSet, 0, 7); - assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 7); - } - - @Test - public void testCanWorkAtMaxValues() { - final int maxLangId = 255; - final int maxTokenType = StandardTokenType.Comment | StandardTokenType.Other | StandardTokenType.RegEx - | StandardTokenType.String; - final int maxFontStyle = Bold | Italic | Underline; - final int maxForeground = 511; - final int maxBackground = 254; - - final int value = StackElementMetadata.set(0, maxLangId, maxTokenType, true, maxFontStyle, maxForeground, - maxBackground); - assertEquals(value, maxLangId, maxTokenType, true, maxFontStyle, maxForeground, maxBackground); - } - - private static void assertEquals(final int metadata, final int languageId, final int /*StandardTokenType*/ tokenType, - final boolean containsBalancedBrackets, final int /*FontStyle*/ fontStyle, final int foreground, final int background) { - final var actual = "{\n" + - "languageId: " + StackElementMetadata.getLanguageId(metadata) + ",\n" + - "tokenType: " + StackElementMetadata.getTokenType(metadata) + ",\n" + - "containsBalancedBrackets: " + StackElementMetadata.containsBalancedBrackets(metadata) + ",\n" + - "fontStyle: " + StackElementMetadata.getFontStyle(metadata) + ",\n" + - "foreground: " + StackElementMetadata.getForeground(metadata) + ",\n" + - "background: " + StackElementMetadata.getBackground(metadata) + ",\n" + - "}"; - - final var expected = "{\n" + - "languageId: " + languageId + ",\n" + - "tokenType: " + tokenType + ",\n" + - "containsBalancedBrackets: " + containsBalancedBrackets + ",\n" + - "fontStyle: " + fontStyle + ",\n" + - "foreground: " + foreground + ",\n" + - "background: " + background + ",\n" + - "}"; - - Assertions.assertEquals(expected, actual, "equals for " + StackElementMetadata.toBinaryStr(metadata)); - } -} diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributesTest.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributesTest.java new file mode 100644 index 000000000..d9602069d --- /dev/null +++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributesTest.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) 2015-2017 Angelo ZERR. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Angelo Zerr - initial API and implementation + */ +package org.eclipse.tm4e.core.internal.grammar.tokenattrs; + +import static org.eclipse.tm4e.core.internal.theme.FontStyle.*; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +/** + * {@link EncodedTokenAttributes} tests same than vscode-textmate. + * + * @see + * github.com/Microsoft/vscode-textmate/blob/master/src/tests/grammar.test.ts + */ +public class EncodedTokenAttributesTest { + + @Test + public void testWorks() { + final int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, null, Underline | Bold, 101, + 102); + assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102); + } + + @Test + public void testCanOverwriteLanguageId() { + int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, null, Underline | Bold, 101, 102); + assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102); + + value = EncodedTokenAttributes.set(value, 2, OptionalStandardTokenType.NotSet, null, NotSet, 0, 0); + assertEquals(value, 2, StandardTokenType.RegEx, false, Underline | Bold, 101, 102); + } + + @Test + public void testCanOverwriteTokenType() { + int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, null, Underline | Bold, 101, 102); + assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102); + + value = EncodedTokenAttributes.set(value, 0, OptionalStandardTokenType.Comment, null, NotSet, 0, 0); + assertEquals(value, 1, StandardTokenType.Comment, false, Underline | Bold, 101, 102); + } + + @Test + public void testCanOverwriteFontStyle() { + int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, null, Underline | Bold, 101, 102); + assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102); + + value = EncodedTokenAttributes.set(value, 0, OptionalStandardTokenType.NotSet, null, None, 0, 0); + assertEquals(value, 1, StandardTokenType.RegEx, false, None, 101, 102); + } + + @Test + public void testCanOverwriteFontStyleWithStrikethrough() { + int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, null, Strikethrough, 101, 102); + assertEquals(value, 1, StandardTokenType.RegEx, false, Strikethrough, 101, 102); + + value = EncodedTokenAttributes.set(value, 0, OptionalStandardTokenType.NotSet, null, None, 0, 0); + assertEquals(value, 1, StandardTokenType.RegEx, false, None, 101, 102); + } + + @Test + public void testCanOverwriteForeground() { + int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, null, Underline | Bold, 101, 102); + assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102); + + value = EncodedTokenAttributes.set(value, 0, OptionalStandardTokenType.NotSet, null, NotSet, 5, 0); + assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 5, 102); + } + + @Test + public void testCanOverwriteBackground() { + int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, null, Underline | Bold, 101, 102); + assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102); + + value = EncodedTokenAttributes.set(value, 0, OptionalStandardTokenType.NotSet, null, NotSet, 0, 7); + assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 7); + } + + @Test + public void testCanWorkAtMaxValues() { + final int maxLangId = 255; + final int maxTokenType = StandardTokenType.Comment | StandardTokenType.Other | StandardTokenType.RegEx + | StandardTokenType.String; + final int maxFontStyle = Bold | Italic | Underline; + final int maxForeground = 511; + final int maxBackground = 254; + + final int value = EncodedTokenAttributes.set(0, maxLangId, maxTokenType, true, maxFontStyle, maxForeground, + maxBackground); + assertEquals(value, maxLangId, maxTokenType, true, maxFontStyle, maxForeground, maxBackground); + } + + private static void assertEquals(final int metadata, final int languageId, + final int /*StandardTokenType*/ tokenType, + final boolean containsBalancedBrackets, final int /*FontStyle*/ fontStyle, final int foreground, + final int background) { + final var actual = "{\n" + + "languageId: " + EncodedTokenAttributes.getLanguageId(metadata) + ",\n" + + "tokenType: " + EncodedTokenAttributes.getTokenType(metadata) + ",\n" + + "containsBalancedBrackets: " + EncodedTokenAttributes.containsBalancedBrackets(metadata) + ",\n" + + "fontStyle: " + EncodedTokenAttributes.getFontStyle(metadata) + ",\n" + + "foreground: " + EncodedTokenAttributes.getForeground(metadata) + ",\n" + + "background: " + EncodedTokenAttributes.getBackground(metadata) + ",\n" + + "}"; + + final var expected = "{\n" + + "languageId: " + languageId + ",\n" + + "tokenType: " + tokenType + ",\n" + + "containsBalancedBrackets: " + containsBalancedBrackets + ",\n" + + "fontStyle: " + fontStyle + ",\n" + + "foreground: " + foreground + ",\n" + + "background: " + background + ",\n" + + "}"; + + Assertions.assertEquals(expected, actual, "equals for " + EncodedTokenAttributes.toBinaryStr(metadata)); + } +} From 773abee10277ed28f683a6753035a2c505fa2e8e Mon Sep 17 00:00:00 2001 From: sebthom Date: Tue, 17 May 2022 12:51:26 +0200 Subject: [PATCH 26/41] add FontStyle#fontStyleToString --- .../tm4e/core/internal/theme/FontStyle.java | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/FontStyle.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/FontStyle.java index 7bdcf04a4..32e274f1f 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/FontStyle.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/FontStyle.java @@ -15,7 +15,7 @@ * Font style definitions. * * @see + * "https://github.com/microsoft/vscode-textmate/blob/f4e28ea43bacb883afa78a466e95a6bdd7b92129/src/theme.ts#L153"> * github.com/microsoft/vscode-textmate/blob/master/src/theme.ts */ public final class FontStyle { @@ -29,6 +29,34 @@ public final class FontStyle { public static final int Underline = 4; public static final int Strikethrough = 8; + public static String fontStyleToString(final int fontStyle) { + if (fontStyle == NotSet) { + return "not set"; + } + if (fontStyle == None) { + return "none"; + } + + final var style = new StringBuilder(); + if ((fontStyle & Italic) == Italic) { + style.append("italic "); + } + if ((fontStyle & Bold) == Bold) { + style.append("bold "); + } + if ((fontStyle & Underline) == Underline) { + style.append("underline "); + } + if ((fontStyle & Strikethrough) == Strikethrough) { + style.append("strikethrough "); + } + if (style.isEmpty()) { + return "none"; + } + style.setLength(style.length() - 1); + return style.toString(); + } + private FontStyle() { } } From b248d6629efdee5d26d31a13775d72077c0d48f7 Mon Sep 17 00:00:00 2001 From: sebthom Date: Tue, 17 May 2022 12:52:09 +0200 Subject: [PATCH 27/41] Don't consider cache field in hashCode/equals --- .../java/org/eclipse/tm4e/core/internal/theme/Theme.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java index ff4a55d41..77ee66eb1 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java @@ -14,7 +14,6 @@ import static org.eclipse.tm4e.core.internal.utils.MoreCollections.*; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -118,7 +117,7 @@ public static List parseTheme(@Nullable final IRawTheme source) final var settingScopes = (List) settingScope; scopes = settingScopes; } else { - scopes = Arrays.asList(""); + scopes = List.of(""); } int fontStyle = FontStyle.NotSet; @@ -267,7 +266,6 @@ public String getColor(final int id) { public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + cache.hashCode(); result = prime * result + colorMap.hashCode(); result = prime * result + defaults.hashCode(); result = prime * result + root.hashCode(); @@ -283,8 +281,7 @@ public boolean equals(@Nullable final Object obj) { return false; } final Theme other = (Theme) obj; - return Objects.equals(cache, other.cache) - && Objects.equals(colorMap, other.colorMap) + return Objects.equals(colorMap, other.colorMap) && Objects.equals(defaults, other.defaults) && Objects.equals(root, other.root); } From 796ceee9b42fa49475e921617f78c501c03f0a07 Mon Sep 17 00:00:00 2001 From: sebthom Date: Tue, 17 May 2022 12:52:25 +0200 Subject: [PATCH 28/41] add EncodedTokenAttributes#toString --- .../tokenattrs/EncodedTokenAttributes.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributes.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributes.java index d7c8de187..1b5a2b360 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributes.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributes.java @@ -30,6 +30,24 @@ public final class EncodedTokenAttributes { private EncodedTokenAttributes() { } + public static String toString(final int encodedTokenAttributes) { + final var languageId = getLanguageId(encodedTokenAttributes); + final var tokenType = getTokenType(encodedTokenAttributes); + final var fontStyle = getFontStyle(encodedTokenAttributes); + final var foreground = getForeground(encodedTokenAttributes); + final var background = getBackground(encodedTokenAttributes); + final var containsBalancedBrackets = containsBalancedBrackets(encodedTokenAttributes); + + return "{\n" + + " languageId: " + languageId + ",\n" + + " tokenType: " + tokenType + ",\n" + + " fontStyle: " + fontStyle + ",\n" + + " foreground: " + foreground + ",\n" + + " background: " + background + "\n," + + " containsBalancedBrackets: " + containsBalancedBrackets + "\n" + + "}"; + } + public static String toBinaryStr(final int metadata) { return new StringBuilder(Integer.toBinaryString(metadata)) .insert(0, "0".repeat(Integer.numberOfLeadingZeros(metadata))) From 3ac8233c43ff8f4f00b9cabe508b6b9b06a6cd32 Mon Sep 17 00:00:00 2001 From: sebthom Date: Tue, 17 May 2022 13:14:40 +0200 Subject: [PATCH 29/41] Rename fields and methods according upstream --- .../internal/theme/ThemeMatchingTest.java | 4 +- .../grammar/AttributedScopeStack.java | 49 +++---- .../grammar/BasicScopeAttributesProvider.java | 44 +++---- .../tm4e/core/internal/grammar/Grammar.java | 71 ++++++----- .../core/internal/grammar/LineTokenizer.java | 120 +++++++++++------- .../core/internal/grammar/LineTokens.java | 96 +++++++------- .../core/internal/grammar/StateStack.java | 74 +++++------ .../tm4e/core/internal/theme/Theme.java | 30 +++-- 8 files changed, 265 insertions(+), 223 deletions(-) diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java index 8c23ef1ea..e3442b6a8 100644 --- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java +++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java @@ -89,7 +89,7 @@ void testGivesHigherPriorityToParentMatches2() throws Exception { final var root = new AttributedScopeStack(null, "text.html.cshtml", 0); final var parent = new AttributedScopeStack(root, "meta.tag.structure.any.html", 0); - final int r = AttributedScopeStack.mergeMetadata(0, parent, + final int r = AttributedScopeStack.mergeAttributes(0, parent, new BasicScopeAttributes("entity.name.tag.structure.any.html", 0, 0, theme.match("entity.name.tag.structure.any.html"))); final String color = theme.getColor(EncodedTokenAttributes.getForeground(r)); @@ -231,7 +231,7 @@ void testMicrosoft_vscode_23460() throws Exception { final var parent2 = new AttributedScopeStack(parent3, "meta.structure.dictionary.json", 0); final var parent1 = new AttributedScopeStack(parent2, "meta.structure.dictionary.value.json", 0); - final int r = AttributedScopeStack.mergeMetadata( + final int r = AttributedScopeStack.mergeAttributes( 0, parent1, new BasicScopeAttributes("string.quoted.double.json", 0, 0, theme.match("string.quoted.double.json"))); diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/AttributedScopeStack.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/AttributedScopeStack.java index b3e98fb42..08b24afb5 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/AttributedScopeStack.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/AttributedScopeStack.java @@ -27,7 +27,6 @@ * @see * https://github.com/Microsoft/vscode-textmate/blob/main/src/grammar.ts - * */ public final class AttributedScopeStack { @@ -35,13 +34,16 @@ public final class AttributedScopeStack { @Nullable private final AttributedScopeStack parent; - private final String scope; - final int metadata; + private final String scopePath; + final int tokenAttributes; - public AttributedScopeStack(@Nullable final AttributedScopeStack parent, final String scope, final int metadata) { + public AttributedScopeStack( + @Nullable final AttributedScopeStack parent, + final String scopePath, + final int tokenAttributes) { this.parent = parent; - this.scope = scope; - this.metadata = metadata; + this.scopePath = scopePath; + this.tokenAttributes = tokenAttributes; } private static boolean structuralEquals(@Nullable AttributedScopeStack a, @Nullable AttributedScopeStack b) { @@ -60,7 +62,7 @@ private static boolean structuralEquals(@Nullable AttributedScopeStack a, @Nulla return false; } - if (!Objects.equals(a.scope, b.scope) || a.metadata != b.metadata) { + if (!Objects.equals(a.scopePath, b.scopePath) || a.tokenAttributes != b.tokenAttributes) { return false; } @@ -90,11 +92,11 @@ public boolean equals(@Nullable final Object other) { @Override public int hashCode() { - return Objects.hash(parent, scope, metadata); + return Objects.hash(parent, scopePath, tokenAttributes); } private static boolean matchesScope(final String scope, final String selector, final String selectorWithDot) { - return (selector.equals(scope) || scope.startsWith(selectorWithDot)); + return selector.equals(scope) || scope.startsWith(selectorWithDot); } /** @@ -113,7 +115,7 @@ private static boolean matches(@Nullable AttributedScopeStack target, @Nullable final var selectorWithDot = selector + '.'; while (target != null) { - if (matchesScope(target.scope, selector, selectorWithDot)) { + if (matchesScope(target.scopePath, selector, selectorWithDot)) { // match for current parent scope found, continue with checking next parent scope continue parent_scopes_loop; } @@ -127,10 +129,12 @@ private static boolean matches(@Nullable AttributedScopeStack target, @Nullable return true; } - public static int mergeMetadata(final int metadata, @Nullable final AttributedScopeStack scopesList, - @Nullable final BasicScopeAttributes source) { + public static int mergeAttributes( + final int existingTokenAttributes, + @Nullable final AttributedScopeStack scopesList, + @Nullable final BasicScopeAttributes source) { if (source == null) { - return metadata; + return existingTokenAttributes; } int fontStyle = FontStyle.NotSet; @@ -149,39 +153,40 @@ public static int mergeMetadata(final int metadata, @Nullable final AttributedSc } } - return EncodedTokenAttributes.set(metadata, source.languageId, source.tokenType, null, fontStyle, foreground, - background); + return EncodedTokenAttributes.set(existingTokenAttributes, source.languageId, source.tokenType, null, fontStyle, + foreground, + background); } private static AttributedScopeStack push(AttributedScopeStack target, final Grammar grammar, - final Iterable scopes) { + final Iterable scopes) { for (final String scope : scopes) { final var rawMetadata = grammar.getMetadataForScope(scope); - final int metadata = AttributedScopeStack.mergeMetadata(target.metadata, target, rawMetadata); + final int metadata = AttributedScopeStack.mergeAttributes(target.tokenAttributes, target, rawMetadata); target = new AttributedScopeStack(target, scope, metadata); } return target; } - AttributedScopeStack push(final Grammar grammar, @Nullable final String scope) { - if (scope == null) { + AttributedScopeStack pushAttributed(@Nullable final String scopePath, final Grammar grammar) { + if (scopePath == null) { return this; } - return AttributedScopeStack.push(this, grammar, BY_SPACE_SPLITTER.split(scope)); + return AttributedScopeStack.push(this, grammar, BY_SPACE_SPLITTER.split(scopePath)); } private static List generateScopes(@Nullable AttributedScopeStack scopesList) { final var result = new ArrayList(); while (scopesList != null) { - result.add(scopesList.scope); + result.add(scopesList.scopePath); scopesList = scopesList.parent; } Collections.reverse(result); return result; } - List generateScopes() { + List getScopeNames() { return AttributedScopeStack.generateScopes(this); } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java index 4e3e59646..9ad7d2abe 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java @@ -35,10 +35,6 @@ final class BasicScopeAttributesProvider { private static final BasicScopeAttributes NULL_SCOPE_METADATA = new BasicScopeAttributes("", 0, 0, null); private static final Pattern STANDARD_TOKEN_TYPE_REGEXP = Pattern.compile("\\b(comment|string|regex)\\b"); - private static final String COMMENT_TOKEN_TYPE = "comment"; - private static final String STRING_TOKEN_TYPE = "string"; - private static final String REGEX_TOKEN_TYPE = "regex"; - private static final String META_EMBEDDED_TOKEN_TYPE = "meta.embedded"; private final int initialLanguage; private final IThemeProvider themeProvider; @@ -52,14 +48,14 @@ final class BasicScopeAttributesProvider { private Pattern embeddedLanguagesRegex; BasicScopeAttributesProvider(final int initialLanguage, final IThemeProvider themeProvider, - @Nullable final Map embeddedLanguages) { + @Nullable final Map embeddedLanguages) { this.initialLanguage = initialLanguage; this.themeProvider = themeProvider; this.defaultMetaData = new BasicScopeAttributes( - "", - this.initialLanguage, - OptionalStandardTokenType.NotSet, - List.of(this.themeProvider.getDefaults())); + "", + this.initialLanguage, + OptionalStandardTokenType.NotSet, + List.of(this.themeProvider.getDefaults())); // embeddedLanguages handling if (embeddedLanguages != null) { @@ -69,25 +65,25 @@ final class BasicScopeAttributesProvider { // create the regex final var escapedScopes = this.embeddedLanguages.keySet().stream() - .map(RegexSource::escapeRegExpCharacters) - .collect(Collectors.toList()); + .map(RegexSource::escapeRegExpCharacters) + .collect(Collectors.toList()); if (escapedScopes.isEmpty()) { // no scopes registered this.embeddedLanguagesRegex = null; } else { this.embeddedLanguagesRegex = Pattern.compile("^((" - + escapedScopes.stream().sorted(Collections.reverseOrder()).collect(Collectors.joining(")|(")) - + "))($|\\.)"); + + escapedScopes.stream().sorted(Collections.reverseOrder()).collect(Collectors.joining(")|(")) + + "))($|\\.)"); } } void onDidChangeTheme() { this.cache.clear(); this.defaultMetaData = new BasicScopeAttributes( - "", - this.initialLanguage, - OptionalStandardTokenType.NotSet, - List.of(this.themeProvider.getDefaults())); + "", + this.initialLanguage, + OptionalStandardTokenType.NotSet, + List.of(this.themeProvider.getDefaults())); } BasicScopeAttributes getDefaultMetadata() { @@ -109,7 +105,7 @@ BasicScopeAttributes getMetadataForScope(@Nullable final String scopeName) { private BasicScopeAttributes doGetMetadataForScope(final String scopeName) { final int languageId = this.scopeToLanguage(scopeName); - final int standardTokenType = BasicScopeAttributesProvider.toStandardTokenType(scopeName); + final int standardTokenType = BasicScopeAttributesProvider._toStandardTokenType(scopeName); final List themeData = this.themeProvider.themeMatch(scopeName); return new BasicScopeAttributes(scopeName, languageId, standardTokenType, themeData); @@ -139,17 +135,17 @@ private int scopeToLanguage(@Nullable final String scope) { return embeddedLanguages.getOrDefault(m.group(1), 0); } - private static int /*OptionalStandardTokenType*/ toStandardTokenType(final String tokenType) { - final var m = STANDARD_TOKEN_TYPE_REGEXP.matcher(tokenType); + private static int /*OptionalStandardTokenType*/ _toStandardTokenType(final String scopeName) { + final var m = STANDARD_TOKEN_TYPE_REGEXP.matcher(scopeName); if (!m.find()) { return OptionalStandardTokenType.NotSet; } final String group = m.group(1); return switch (group) { - case COMMENT_TOKEN_TYPE -> OptionalStandardTokenType.Comment; - case STRING_TOKEN_TYPE -> OptionalStandardTokenType.String; - case REGEX_TOKEN_TYPE -> OptionalStandardTokenType.RegEx; - case META_EMBEDDED_TOKEN_TYPE -> OptionalStandardTokenType.Other; + case "comment" -> OptionalStandardTokenType.Comment; + case "string" -> OptionalStandardTokenType.String; + case "regex" -> OptionalStandardTokenType.RegEx; + case "meta.embedded" -> OptionalStandardTokenType.Other; default -> throw new TMException("Unexpected match for standard token type: " + group); }; } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java index cb286fc6d..eed554afe 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java @@ -60,17 +60,17 @@ public final class Grammar implements IGrammar, IRuleFactoryHelper { private final String rootScopeName; @Nullable - private RuleId rootId = null; - private int lastRuleId = 0; - private final Map ruleId2desc = new HashMap<>(); + private RuleId _rootId = null; + private int _lastRuleId = 0; + private final Map _ruleId2desc = new HashMap<>(); private final Map includedGrammars = new HashMap<>(); - private final IGrammarRepository grammarRepository; - private final IRawGrammar grammar; + private final IGrammarRepository _grammarRepository; + private final IRawGrammar _grammar; @Nullable - private List injections; - private final BasicScopeAttributesProvider scopeMetadataProvider; - private final List tokenTypeMatchers = new ArrayList<>(); + private List _injections; + private final BasicScopeAttributesProvider _scopeMetadataProvider; + private final List _tokenTypeMatchers = new ArrayList<>(); @Nullable private final BalancedBracketSelectors balancedBracketSelectors; @@ -86,9 +86,10 @@ public Grammar( final IThemeProvider themeProvider) { this.rootScopeName = rootScopeName; - this.scopeMetadataProvider = new BasicScopeAttributesProvider(initialLanguage, themeProvider, embeddedLanguages); - this.grammarRepository = grammarRepository; - this.grammar = initGrammar(grammar, null); + this._scopeMetadataProvider = new BasicScopeAttributesProvider(initialLanguage, themeProvider, + embeddedLanguages); + this._grammarRepository = grammarRepository; + this._grammar = initGrammar(grammar, null); this.balancedBracketSelectors = balancedBracketSelectors; if (tokenTypes != null) { @@ -96,24 +97,24 @@ public Grammar( final var selector = entry.getKey(); final var type = entry.getValue(); for (final var matcher : Matcher.createMatchers(selector)) { - tokenTypeMatchers.add(new TokenTypeMatcher(matcher.matcher, type)); + _tokenTypeMatchers.add(new TokenTypeMatcher(matcher.matcher, type)); } } } } public void onDidChangeTheme() { - this.scopeMetadataProvider.onDidChangeTheme(); + this._scopeMetadataProvider.onDidChangeTheme(); } BasicScopeAttributes getMetadataForScope(final String scope) { - return this.scopeMetadataProvider.getMetadataForScope(scope); + return this._scopeMetadataProvider.getMetadataForScope(scope); } private void collectInjections(final List result, final String selector, final IRawRule rule, final IRuleFactoryHelper ruleFactoryHelper, final IRawGrammar grammar) { final var matchers = Matcher.createMatchers(selector); - final var ruleId = RuleFactory.getCompiledRuleId(rule, ruleFactoryHelper, this.grammar.getRepository()); + final var ruleId = RuleFactory.getCompiledRuleId(rule, ruleFactoryHelper, this._grammar.getRepository()); for (final var matcher : matchers) { result.add(new Injection( selector, @@ -129,14 +130,14 @@ private List _collectInjections() { @Override public @Nullable IRawGrammar lookup(final String scopeName) { if (Objects.equals(scopeName, Grammar.this.rootScopeName)) { - return Grammar.this.grammar; + return Grammar.this._grammar; } return getExternalGrammar(scopeName, null); } @Override public @Nullable Collection injections(final String targetScope) { - return Grammar.this.grammarRepository.injections(targetScope); + return Grammar.this._grammarRepository.injections(targetScope); } }; @@ -160,7 +161,7 @@ private List _collectInjections() { } // add injection grammars contributed for the current scope - final var injectionScopeNames = this.grammarRepository.injections(scopeName); + final var injectionScopeNames = this._grammarRepository.injections(scopeName); if (injectionScopeNames != null) { injectionScopeNames.forEach(injectionScopeName -> { final var injectionGrammar = Grammar.this.getExternalGrammar(injectionScopeName, null); @@ -185,9 +186,9 @@ private List _collectInjections() { } List getInjections() { - var injections = this.injections; + var injections = this._injections; if (injections == null) { - injections = this.injections = this._collectInjections(); + injections = this._injections = this._collectInjections(); if (LOGGER.isLoggable(Level.TRACE) && !injections.isEmpty()) { LOGGER.log(Level.TRACE, @@ -202,18 +203,18 @@ List getInjections() { @Override public T registerRule(final Function factory) { - final var id = RuleId.of(++this.lastRuleId); + final var id = RuleId.of(++this._lastRuleId); final @Nullable T result = factory.apply(id); - this.ruleId2desc.put(id, result); + this._ruleId2desc.put(id, result); return result; } @Override public Rule getRule(final RuleId ruleId) { - final var rule = this.ruleId2desc.get(ruleId); + final var rule = this._ruleId2desc.get(ruleId); if (rule == null) { throw new IndexOutOfBoundsException( - "No rule with index " + ruleId.id + " found. Possible values: 0.." + this.ruleId2desc.size()); + "No rule with index " + ruleId.id + " found. Possible values: 0.." + this._ruleId2desc.size()); } return rule; } @@ -225,7 +226,7 @@ public IRawGrammar getExternalGrammar(final String scopeName, @Nullable final IR return this.includedGrammars.get(scopeName); } - final IRawGrammar rawIncludedGrammar = this.grammarRepository.lookup(scopeName); + final IRawGrammar rawIncludedGrammar = this._grammarRepository.lookup(scopeName); if (rawIncludedGrammar != null) { this.includedGrammars.put(scopeName, initGrammar( rawIncludedGrammar, @@ -275,18 +276,18 @@ private T _tokenize( String lineText, @Nullable StateStack prevState, final boolean emitBinaryTokens) { - var rootId = this.rootId; + var rootId = this._rootId; if (rootId == null) { - rootId = this.rootId = RuleFactory.getCompiledRuleId( - this.grammar.getRepository().getSelf(), + rootId = this._rootId = RuleFactory.getCompiledRuleId( + this._grammar.getRepository().getSelf(), this, - this.grammar.getRepository()); + this._grammar.getRepository()); } boolean isFirstLine; if (prevState == null || prevState.equals(StateStack.NULL)) { isFirstLine = true; - final var rawDefaultMetadata = this.scopeMetadataProvider.getDefaultMetadata(); + final var rawDefaultMetadata = this._scopeMetadataProvider.getDefaultMetadata(); final var themeData = rawDefaultMetadata.themeData; final var defaultTheme = themeData == null ? null : themeData.get(0); final int defaultMetadata = EncodedTokenAttributes.set( @@ -300,8 +301,8 @@ private T _tokenize( final var rootScopeName = this.getRule(rootId).getName(null, null); - final var rawRootMetadata = this.scopeMetadataProvider.getMetadataForScope(rootScopeName); - final int rootMetadata = AttributedScopeStack.mergeMetadata(defaultMetadata, null, rawRootMetadata); + final var rawRootMetadata = this._scopeMetadataProvider.getMetadataForScope(rootScopeName); + final int rootMetadata = AttributedScopeStack.mergeAttributes(defaultMetadata, null, rawRootMetadata); final var scopeList = new AttributedScopeStack( null, @@ -333,7 +334,7 @@ private T _tokenize( final var lineTokens = new LineTokens( emitBinaryTokens, lineText, - tokenTypeMatchers, + _tokenTypeMatchers, balancedBracketSelectors); final var nextState = LineTokenizer.tokenizeString( this, @@ -353,7 +354,7 @@ private T _tokenize( @Override @Nullable public String getName() { - return grammar.getName(); + return _grammar.getName(); } @Override @@ -363,6 +364,6 @@ public String getScopeName() { @Override public Collection getFileTypes() { - return grammar.getFileTypes(); + return _grammar.getFileTypes(); } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java index 3568fe1c6..407c7498b 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java @@ -139,7 +139,7 @@ private void scanNext() { */ lineTokens.produce(stack, captureIndices[0].start); - stack = stack.setContentNameScopesList(stack.nameScopesList); + stack = stack.withContentNameScopesList(stack.nameScopesList); handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, poppedRule.endCaptures, captureIndices); lineTokens.produce(stack, captureIndices[0].end); @@ -169,29 +169,48 @@ private void scanNext() { final StateStack beforePush = stack; // push it on the stack rule - final String scopeName = rule.getName(lineText.content, captureIndices); - final AttributedScopeStack nameScopesList = stack.contentNameScopesList.push(grammar, scopeName); - stack = stack.push(matchedRuleId, linePos, anchorPosition, - captureIndices[0].end == lineText.bytesCount, null, nameScopesList, nameScopesList); + final var scopeName = rule.getName(lineText.content, captureIndices); + final var nameScopesList = stack.contentNameScopesList.pushAttributed( + scopeName, + grammar); + stack = stack.push( + matchedRuleId, + linePos, + anchorPosition, + captureIndices[0].end == lineText.bytesCount, + null, + nameScopesList, + nameScopesList); if (rule instanceof final BeginEndRule pushedRule) { - // if (IN_DEBUG_MODE) { - // console.log(' pushing ' + pushedRule.debugName + ' - ' + - // pushedRule.debugBeginRegExp); - // } - - handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, pushedRule.beginCaptures, + /*if(LOGGER.isLoggable(DEBUG)) { + LOGGER.log(DEBUG, " pushing " + pushedRule.debugName + " - " + pushedRule.debugBeginRegExp); + }*/ + + handleCaptures( + grammar, + lineText, + isFirstLine, + stack, + lineTokens, + pushedRule.beginCaptures, captureIndices); lineTokens.produce(stack, captureIndices[0].end); anchorPosition = captureIndices[0].end; - final String contentName = pushedRule.getContentName(lineText.content, captureIndices); - final AttributedScopeStack contentNameScopesList = nameScopesList.push(grammar, contentName); - stack = stack.setContentNameScopesList(contentNameScopesList); + final var contentName = pushedRule.getContentName( + lineText.content, + captureIndices); + final var contentNameScopesList = nameScopesList.pushAttributed( + contentName, + grammar); + stack = stack.withContentNameScopesList(contentNameScopesList); if (pushedRule.endHasBackReferences) { - stack = stack.setEndRule( - pushedRule.getEndWithResolvedBackReferences(lineText.content, captureIndices)); + stack = stack.withEndRule( + pushedRule.getEndWithResolvedBackReferences( + lineText.content, + captureIndices)); } if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) { @@ -204,22 +223,33 @@ private void scanNext() { return; } } else if (rule instanceof final BeginWhileRule pushedRule) { - // if (IN_DEBUG_MODE) { - // console.log(' pushing ' + pushedRule.debugName); + // if (DebugFlags.InDebugMode) { + // console.log(" pushing " + pushedRule.debugName); // } - handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, pushedRule.beginCaptures, + handleCaptures( + grammar, + lineText, + isFirstLine, + stack, + lineTokens, + pushedRule.beginCaptures, captureIndices); lineTokens.produce(stack, captureIndices[0].end); anchorPosition = captureIndices[0].end; - - final String contentName = pushedRule.getContentName(lineText.content, captureIndices); - final AttributedScopeStack contentNameScopesList = nameScopesList.push(grammar, contentName); - stack = stack.setContentNameScopesList(contentNameScopesList); + final var contentName = pushedRule.getContentName( + lineText.content, + captureIndices); + final var contentNameScopesList = nameScopesList.pushAttributed( + contentName, + grammar); + stack = stack.withContentNameScopesList(contentNameScopesList); if (pushedRule.whileHasBackReferences) { - stack = stack.setEndRule( - pushedRule.getWhileWithResolvedBackReferences(lineText.content, captureIndices)); + stack = stack.withEndRule( + pushedRule.getWhileWithResolvedBackReferences( + lineText.content, + captureIndices)); } if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) { @@ -233,12 +263,18 @@ private void scanNext() { } } else { final MatchRule matchingRule = (MatchRule) rule; - // if (IN_DEBUG_MODE) { + // if (DebugFlags.InDebugMode) { // console.log(' matched ' + matchingRule.debugName + ' - ' + // matchingRule.debugMatchRegExp); // } - handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, matchingRule.captures, + handleCaptures( + grammar, + lineText, + isFirstLine, + stack, + lineTokens, + matchingRule.captures, captureIndices); lineTokens.produce(stack, captureIndices[0].end); @@ -267,8 +303,8 @@ private void scanNext() { @Nullable private IMatchResult matchRule(final Grammar grammar, final OnigString lineText, final boolean isFirstLine, final int linePos, final StateStack stack, final int anchorPosition) { - final Rule rule = stack.getRule(grammar); - final CompiledRule ruleScanner = rule.compileAG(grammar, stack.endRule, isFirstLine, linePos == anchorPosition); + final var rule = stack.getRule(grammar); + final var ruleScanner = rule.compileAG(grammar, stack.endRule, isFirstLine, linePos == anchorPosition); final OnigNextMatchResult r = ruleScanner.scanner.findNextMatchSync(lineText, linePos); @@ -334,12 +370,12 @@ private IMatchInjectionsResult matchInjections(final List injections, final OnigString lineText, final boolean isFirstLine, final int linePos, final StateStack stack, final int anchorPosition) { // The lower the better - int bestMatchRating = Integer.MAX_VALUE; + var bestMatchRating = Integer.MAX_VALUE; OnigCaptureIndex[] bestMatchCaptureIndices = null; - RuleId bestMatchRuleId = RuleId.END_RULE; - int bestMatchResultPriority = 0; + var bestMatchRuleId = RuleId.END_RULE; + var bestMatchResultPriority = 0; - final List scopes = stack.contentNameScopesList.generateScopes(); + final var scopes = stack.contentNameScopesList.getScopeNames(); for (final Injection injection : injections) { if (!injection.matches(scopes)) { @@ -347,10 +383,9 @@ private IMatchInjectionsResult matchInjections(final List injections, continue; } - final CompiledRule ruleScanner = grammar.getRule(injection.ruleId).compileAG(grammar, null, isFirstLine, - linePos == anchorPosition); - final OnigNextMatchResult matchResult = ruleScanner.scanner.findNextMatchSync(lineText, linePos); - + final var rule = grammar.getRule(injection.ruleId); + final var ruleScanner = rule.compileAG(grammar, null, isFirstLine, linePos == anchorPosition); + final var matchResult = ruleScanner.scanner.findNextMatchSync(lineText, linePos); if (matchResult == null) { continue; } @@ -359,11 +394,10 @@ private IMatchInjectionsResult matchInjections(final List injections, LOGGER.log(Level.TRACE, " matched injection: " + injection.debugSelector); LOGGER.log(Level.TRACE, debugCompiledRuleToString(ruleScanner)); } - final int matchRating = matchResult.getCaptureIndices()[0].start; + final int matchRating = matchResult.getCaptureIndices()[0].start; if (matchRating > bestMatchRating) { - // Injections are sorted by priority, so the previous injection had a better or - // equal priority + // Injections are sorted by priority, so the previous injection had a better or equal priority continue; } @@ -453,9 +487,9 @@ private void handleCaptures(final Grammar grammar, final OnigString lineText, fi if (retokenizeCapturedWithRuleId.notEquals(RuleId.NO_RULE)) { // the capture requires additional matching final var scopeName = captureRule.getName(lineTextContent, captureIndices); - final var nameScopesList = stack.contentNameScopesList.push(grammar, scopeName); + final var nameScopesList = stack.contentNameScopesList.pushAttributed(scopeName, grammar); final var contentName = captureRule.getContentName(lineTextContent, captureIndices); - final var contentNameScopesList = nameScopesList.push(grammar, contentName); + final var contentNameScopesList = nameScopesList.pushAttributed(contentName, grammar); // the capture requires additional matching final var stackClone = stack.push(retokenizeCapturedWithRuleId, captureIndex.start, -1, false, null, @@ -470,7 +504,7 @@ private void handleCaptures(final Grammar grammar, final OnigString lineText, fi if (captureRuleScopeName != null) { // push final var base = localStack.isEmpty() ? stack.contentNameScopesList : localStack.getLast().scopes; - final var captureRuleScopesList = base.push(grammar, captureRuleScopeName); + final var captureRuleScopesList = base.pushAttributed(captureRuleScopeName, grammar); localStack.add(new LocalStackElement(captureRuleScopesList, captureIndex.end)); } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java index 22baffd1d..6ecc08d43 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java @@ -39,43 +39,43 @@ final class LineTokens { private static final Deque EMPTY_DEQUE = new ArrayDeque<>(0); + private final boolean _emitBinaryTokens; + /** * defined only if `LOGGER.isLoggable(TRACE)`. */ @Nullable - private final String lineText; + private final String _lineText; /** * used only if `emitBinaryTokens` is false. */ - private final Deque tokens; - - private final boolean emitBinaryTokens; + private final Deque _tokens; /** * used only if `emitBinaryTokens` is true. */ - private final List binaryTokens; + private final List _binaryTokens; - private int lastTokenEndIndex = 0; + private int _lastTokenEndIndex = 0; - private final List tokenTypeOverrides; + private final List _tokenTypeOverrides; @Nullable private final BalancedBracketSelectors balancedBracketSelectors; LineTokens(final boolean emitBinaryTokens, final String lineText, final List tokenTypeOverrides, @Nullable final BalancedBracketSelectors balancedBracketSelectors) { - this.emitBinaryTokens = emitBinaryTokens; - this.lineText = LOGGER.isLoggable(TRACE) ? lineText : null; // store line only if it's logged - if (this.emitBinaryTokens) { - this.tokens = EMPTY_DEQUE; - this.binaryTokens = new ArrayList<>(); + this._emitBinaryTokens = emitBinaryTokens; + this._lineText = LOGGER.isLoggable(TRACE) ? lineText : null; // store line only if it's logged + if (this._emitBinaryTokens) { + this._tokens = EMPTY_DEQUE; + this._binaryTokens = new ArrayList<>(); } else { - this.tokens = new ArrayDeque<>(); - this.binaryTokens = Collections.emptyList(); + this._tokens = new ArrayDeque<>(); + this._binaryTokens = Collections.emptyList(); } - this.tokenTypeOverrides = tokenTypeOverrides; + this._tokenTypeOverrides = tokenTypeOverrides; this.balancedBracketSelectors = balancedBracketSelectors; } @@ -84,23 +84,23 @@ void produce(final StateStack stack, final int endIndex) { } void produceFromScopes(final AttributedScopeStack scopesList, final int endIndex) { - if (this.lastTokenEndIndex >= endIndex) { + if (this._lastTokenEndIndex >= endIndex) { return; } - if (this.emitBinaryTokens) { - int metadata = scopesList.metadata; + if (this._emitBinaryTokens) { + int metadata = scopesList.tokenAttributes; var containsBalancedBrackets = false; final var balancedBracketSelectors = this.balancedBracketSelectors; if (balancedBracketSelectors != null && balancedBracketSelectors.matchesAlways()) { containsBalancedBrackets = true; } - if (!tokenTypeOverrides.isEmpty() || balancedBracketSelectors != null + if (!_tokenTypeOverrides.isEmpty() || balancedBracketSelectors != null && !balancedBracketSelectors.matchesAlways() && !balancedBracketSelectors.matchesNever()) { // Only generate scope array when required to improve performance - final var scopes = scopesList.generateScopes(); - for (final var tokenType : tokenTypeOverrides) { + final var scopes = scopesList.getScopeNames(); + for (final var tokenType : _tokenTypeOverrides) { if (tokenType.matcher.matches(scopes)) { metadata = EncodedTokenAttributes.set( metadata, @@ -128,17 +128,17 @@ void produceFromScopes(final AttributedScopeStack scopesList, final int endIndex 0); } - if (!this.binaryTokens.isEmpty() && getLastElement(this.binaryTokens) == metadata) { + if (!this._binaryTokens.isEmpty() && getLastElement(this._binaryTokens) == metadata) { // no need to push a token with the same metadata - this.lastTokenEndIndex = endIndex; + this._lastTokenEndIndex = endIndex; return; } if (LOGGER.isLoggable(TRACE)) { - final List scopes = scopesList.generateScopes(); + final var scopes = scopesList.getScopeNames(); LOGGER.log(TRACE, " token: |" + - castNonNull(this.lineText) - .substring(this.lastTokenEndIndex >= 0 ? this.lastTokenEndIndex : 0, endIndex) + castNonNull(this._lineText) + .substring(this._lastTokenEndIndex >= 0 ? this._lastTokenEndIndex : 0, endIndex) .replace("\n", "\\n") + '|'); for (final String scope : scopes) { @@ -146,19 +146,19 @@ void produceFromScopes(final AttributedScopeStack scopesList, final int endIndex } } - this.binaryTokens.add(this.lastTokenEndIndex); - this.binaryTokens.add(metadata); + this._binaryTokens.add(this._lastTokenEndIndex); + this._binaryTokens.add(metadata); - this.lastTokenEndIndex = endIndex; + this._lastTokenEndIndex = endIndex; return; } - final List scopes = scopesList.generateScopes(); + final List scopes = scopesList.getScopeNames(); if (LOGGER.isLoggable(TRACE)) { LOGGER.log(TRACE, " token: |" + - castNonNull(this.lineText) - .substring(this.lastTokenEndIndex >= 0 ? this.lastTokenEndIndex : 0, endIndex) + castNonNull(this._lineText) + .substring(this._lastTokenEndIndex >= 0 ? this._lastTokenEndIndex : 0, endIndex) .replace("\n", "\\n") + '|'); for (final String scope : scopes) { @@ -166,42 +166,42 @@ void produceFromScopes(final AttributedScopeStack scopesList, final int endIndex } } - this.tokens.add(new Token( - this.lastTokenEndIndex >= 0 ? this.lastTokenEndIndex : 0, + this._tokens.add(new Token( + this._lastTokenEndIndex >= 0 ? this._lastTokenEndIndex : 0, endIndex, scopes)); - this.lastTokenEndIndex = endIndex; + this._lastTokenEndIndex = endIndex; } IToken[] getResult(final StateStack stack, final int lineLength) { - if (!this.tokens.isEmpty() && this.tokens.getLast().getStartIndex() == lineLength - 1) { + if (!this._tokens.isEmpty() && this._tokens.getLast().getStartIndex() == lineLength - 1) { // pop produced token for newline - this.tokens.removeLast(); + this._tokens.removeLast(); } - if (this.tokens.isEmpty()) { - this.lastTokenEndIndex = -1; + if (this._tokens.isEmpty()) { + this._lastTokenEndIndex = -1; this.produce(stack, lineLength); - this.tokens.getLast().setStartIndex(0); + this._tokens.getLast().setStartIndex(0); } - return this.tokens.toArray(IToken[]::new); + return this._tokens.toArray(IToken[]::new); } int[] getBinaryResult(final StateStack stack, final int lineLength) { - if (!this.binaryTokens.isEmpty() && this.binaryTokens.get(binaryTokens.size() - 2) == lineLength - 1) { + if (!this._binaryTokens.isEmpty() && this._binaryTokens.get(_binaryTokens.size() - 2) == lineLength - 1) { // pop produced token for newline - removeLastElement(this.binaryTokens); - removeLastElement(this.binaryTokens); + removeLastElement(this._binaryTokens); + removeLastElement(this._binaryTokens); } - if (this.binaryTokens.isEmpty()) { - this.lastTokenEndIndex = -1; + if (this._binaryTokens.isEmpty()) { + this._lastTokenEndIndex = -1; this.produce(stack, lineLength); - this.binaryTokens.set(binaryTokens.size() - 2, 0); + this._binaryTokens.set(_binaryTokens.size() - 2, 0); } - return binaryTokens.stream().mapToInt(Integer::intValue).toArray(); + return _binaryTokens.stream().mapToInt(Integer::intValue).toArray(); } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StateStack.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StateStack.java index 3c5d3d67f..d90b0b93f 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StateStack.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StateStack.java @@ -38,7 +38,7 @@ public final class StateStack implements IStateStack { public static final StateStack NULL = new StateStack(null, RuleId.NO_RULE, 0, 0, false, null, - new AttributedScopeStack(null, "", 0), new AttributedScopeStack(null, "", 0)); + new AttributedScopeStack(null, "", 0), new AttributedScopeStack(null, "", 0)); /** * The position on the current line where this state was pushed. @@ -93,14 +93,14 @@ public final class StateStack implements IStateStack { final AttributedScopeStack contentNameScopesList; StateStack( - @Nullable final StateStack parent, - final RuleId ruleId, - final int enterPos, - final int anchorPos, - final boolean beginRuleCapturedEOL, - @Nullable final String endRule, - final AttributedScopeStack nameScopesList, - final AttributedScopeStack contentNameScopesList) { + @Nullable final StateStack parent, + final RuleId ruleId, + final int enterPos, + final int anchorPos, + final boolean beginRuleCapturedEOL, + @Nullable final String endRule, + final AttributedScopeStack nameScopesList, + final AttributedScopeStack contentNameScopesList) { this.parent = parent; depth = this.parent != null ? this.parent.depth + 1 : 1; this.ruleId = ruleId; @@ -195,20 +195,20 @@ StateStack safePop() { } StateStack push(final RuleId ruleId, - final int enterPos, - final int anchorPos, - final boolean beginRuleCapturedEOL, - @Nullable final String endRule, - final AttributedScopeStack nameScopesList, - final AttributedScopeStack contentNameScopesList) { + final int enterPos, + final int anchorPos, + final boolean beginRuleCapturedEOL, + @Nullable final String endRule, + final AttributedScopeStack nameScopesList, + final AttributedScopeStack contentNameScopesList) { return new StateStack(this, - ruleId, - enterPos, - anchorPos, - beginRuleCapturedEOL, - endRule, - nameScopesList, - contentNameScopesList); + ruleId, + enterPos, + anchorPos, + beginRuleCapturedEOL, + endRule, + nameScopesList, + contentNameScopesList); } int getAnchorPos() { @@ -238,31 +238,31 @@ public String toString() { return '[' + String.join(", ", r) + ']'; } - StateStack setContentNameScopesList(final AttributedScopeStack contentNameScopesList) { + StateStack withContentNameScopesList(final AttributedScopeStack contentNameScopesList) { if (this.contentNameScopesList.equals(contentNameScopesList)) { return this; } return castNonNull(this.parent).push(this.ruleId, - this.enterPosition, - this.anchorPos, - this.beginRuleCapturedEOL, - this.endRule, - this.nameScopesList, - contentNameScopesList); + this.enterPosition, + this.anchorPos, + this.beginRuleCapturedEOL, + this.endRule, + this.nameScopesList, + contentNameScopesList); } - StateStack setEndRule(final String endRule) { + StateStack withEndRule(final String endRule) { if (this.endRule != null && this.endRule.equals(endRule)) { return this; } return new StateStack(this.parent, - this.ruleId, - this.enterPosition, - this.anchorPos, - this.beginRuleCapturedEOL, - endRule, - this.nameScopesList, - this.contentNameScopesList); + this.ruleId, + this.enterPosition, + this.anchorPos, + this.beginRuleCapturedEOL, + endRule, + this.nameScopesList, + this.contentNameScopesList); } boolean hasSameRuleAs(final StateStack other) { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java index 77ee66eb1..5fe800c1f 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java @@ -56,7 +56,7 @@ public static Theme createFromParsedTheme(final List source, private final ColorMap colorMap; private final ThemeTrieElement root; private final ThemeTrieElementRule defaults; - private final Map> cache = new HashMap<>(); + private final Map> _cachedMatchRoot = new HashMap<>(); public Theme(final ColorMap colorMap, final ThemeTrieElementRule defaults, final ThemeTrieElement root) { this.colorMap = colorMap; @@ -73,10 +73,10 @@ public ThemeTrieElementRule getDefaults() { } public List match(final String scopeName) { - if (!this.cache.containsKey(scopeName)) { - this.cache.put(scopeName, this.root.match(scopeName)); + if (!this._cachedMatchRoot.containsKey(scopeName)) { + this._cachedMatchRoot.put(scopeName, this.root.match(scopeName)); } - return this.cache.get(scopeName); + return this._cachedMatchRoot.get(scopeName); } /** @@ -104,14 +104,14 @@ public static List parseTheme(@Nullable final IRawTheme source) final Object settingScope = entry.getScope(); List scopes; - if (settingScope instanceof String scope) { + if (settingScope instanceof String _scope) { // remove leading commas - scope = scope.replaceAll("^[,]+", ""); + _scope = _scope.replaceAll("^[,]+", ""); // remove trailing commas - scope = scope.replaceAll("[,]+$", ""); + _scope = _scope.replaceAll("[,]+$", ""); - scopes = BY_COMMA_SPLITTER.splitToList(scope); + scopes = BY_COMMA_SPLITTER.splitToList(_scope); } else if (settingScope instanceof List) { @SuppressWarnings("unchecked") final var settingScopes = (List) settingScope; @@ -159,18 +159,24 @@ && isValidHexColor(stringSettingsBackground)) { } for (int j = 0, lenJ = scopes.size(); j < lenJ; j++) { - final String _scope = scopes.get(j).trim(); + final var _scope = scopes.get(j).trim(); - final List segments = BY_SPACE_SPLITTER.splitToList(_scope); + final var segments = BY_SPACE_SPLITTER.splitToList(_scope); - final String scope = getLastElement(segments); + final var scope = getLastElement(segments); List parentScopes = null; if (segments.size() > 1) { parentScopes = segments.subList(0, segments.size() - 1); parentScopes = Lists.reverse(parentScopes); } - result.add(new ParsedThemeRule(scope, parentScopes, i, fontStyle, foreground, background)); + result.add(new ParsedThemeRule( + scope, + parentScopes, + i, + fontStyle, + foreground, + background)); } } From b42c5413a2d42c3ba54bddbb322187456ae2f593 Mon Sep 17 00:00:00 2001 From: sebthom Date: Tue, 17 May 2022 13:18:47 +0200 Subject: [PATCH 30/41] Adapt equals method according upstream project --- .../grammar/AttributedScopeStack.java | 31 +++++-------------- 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/AttributedScopeStack.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/AttributedScopeStack.java index 08b24afb5..f856df975 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/AttributedScopeStack.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/AttributedScopeStack.java @@ -46,7 +46,13 @@ public AttributedScopeStack( this.tokenAttributes = tokenAttributes; } - private static boolean structuralEquals(@Nullable AttributedScopeStack a, @Nullable AttributedScopeStack b) { + public boolean equals(final AttributedScopeStack other) { + return _equals(this, other); + } + + private static boolean _equals( + @Nullable AttributedScopeStack a, + @Nullable AttributedScopeStack b) { do { if (a == b) { return true; @@ -72,29 +78,6 @@ private static boolean structuralEquals(@Nullable AttributedScopeStack a, @Nulla } while (true); } - private static boolean equals(@Nullable final AttributedScopeStack a, @Nullable final AttributedScopeStack b) { - if (a == b) { - return true; - } - if (a == null || b == null) { - return false; - } - return structuralEquals(a, b); - } - - @Override - public boolean equals(@Nullable final Object other) { - if (other == null || other.getClass() != AttributedScopeStack.class) { - return false; - } - return equals(this, (AttributedScopeStack) other); - } - - @Override - public int hashCode() { - return Objects.hash(parent, scopePath, tokenAttributes); - } - private static boolean matchesScope(final String scope, final String selector, final String selectorWithDot) { return selector.equals(scope) || scope.startsWith(selectorWithDot); } From 9f35f9f1cb5aa4350eda4160cf4c120c2424745b Mon Sep 17 00:00:00 2001 From: sebthom Date: Tue, 17 May 2022 13:21:33 +0200 Subject: [PATCH 31/41] Replace IMatchResult interface with MatchResult class --- .../core/internal/grammar/LineTokenizer.java | 91 ++++++++----------- 1 file changed, 38 insertions(+), 53 deletions(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java index 407c7498b..aff45a755 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java @@ -39,21 +39,31 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/grammar.ts + * "https://github.com/microsoft/vscode-textmate/blob/9157c7f869219dbaf9a5a5607f099c00fe694a29/src/tokenizeString.ts#L1028"> + * github.com/Microsoft/vscode-textmate/blob/master/src/tokenizeString.ts */ final class LineTokenizer { private static final Logger LOGGER = System.getLogger(LineTokenizer.class.getName()); - private interface IMatchResult { - OnigCaptureIndex[] getCaptureIndices(); + private static class MatchResult { + final OnigCaptureIndex[] captureIndices; + final RuleId matchedRuleId; - RuleId getMatchedRuleId(); + MatchResult(final RuleId matchedRuleId, final OnigCaptureIndex[] captureIndices) { + this.matchedRuleId = matchedRuleId; + this.captureIndices = captureIndices; + } } - private interface IMatchInjectionsResult extends IMatchResult { - boolean isPriorityMatch(); + private static final class MatchInjectionsResult extends MatchResult { + boolean isPriorityMatch; + + MatchInjectionsResult(final RuleId matchedRuleId, final OnigCaptureIndex[] captureIndices, + final boolean isPriorityMatch) { + super(matchedRuleId, captureIndices); + this.isPriorityMatch = isPriorityMatch; + } } private static final class WhileCheckResult { @@ -113,7 +123,7 @@ private StateStack scan(final boolean checkWhileConditions) { private void scanNext() { LOGGER.log(TRACE, () -> "@@scanNext: |" + lineText.content.replace("\n", "\\n").substring(linePos) + '|'); - final IMatchResult r = matchRuleOrInjections(grammar, lineText, isFirstLine, linePos, stack, anchorPosition); + final MatchResult r = matchRuleOrInjections(grammar, lineText, isFirstLine, linePos, stack, anchorPosition); if (r == null) { LOGGER.log(TRACE, " no more matches."); @@ -123,9 +133,9 @@ private void scanNext() { return; } - final OnigCaptureIndex[] captureIndices = r.getCaptureIndices(); + final OnigCaptureIndex[] captureIndices = r.captureIndices; - final RuleId matchedRuleId = r.getMatchedRuleId(); + final RuleId matchedRuleId = r.matchedRuleId; final boolean hasAdvanced = captureIndices.length > 0 && captureIndices[0].end > linePos; @@ -301,7 +311,7 @@ private void scanNext() { } @Nullable - private IMatchResult matchRule(final Grammar grammar, final OnigString lineText, final boolean isFirstLine, + private MatchResult matchRule(final Grammar grammar, final OnigString lineText, final boolean isFirstLine, final int linePos, final StateStack stack, final int anchorPosition) { final var rule = stack.getRule(grammar); final var ruleScanner = rule.compileAG(grammar, stack.endRule, isFirstLine, linePos == anchorPosition); @@ -309,28 +319,17 @@ private IMatchResult matchRule(final Grammar grammar, final OnigString lineText, final OnigNextMatchResult r = ruleScanner.scanner.findNextMatchSync(lineText, linePos); if (r != null) { - return new IMatchResult() { - - @Override - public RuleId getMatchedRuleId() { - return ruleScanner.rules[r.getIndex()]; - } - - @Override - public OnigCaptureIndex[] getCaptureIndices() { - return r.getCaptureIndices(); - } - }; + return new MatchResult(ruleScanner.rules[r.getIndex()], r.getCaptureIndices()); } return null; } @Nullable - private IMatchResult matchRuleOrInjections(final Grammar grammar, final OnigString lineText, + private MatchResult matchRuleOrInjections(final Grammar grammar, final OnigString lineText, final boolean isFirstLine, final int linePos, final StateStack stack, final int anchorPosition) { // Look for normal grammar rule - final IMatchResult matchResult = matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition); + final MatchResult matchResult = matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition); // Look for injected rules final List injections = grammar.getInjections(); @@ -339,7 +338,7 @@ private IMatchResult matchRuleOrInjections(final Grammar grammar, final OnigStri return matchResult; } - final IMatchInjectionsResult injectionResult = matchInjections(injections, grammar, lineText, isFirstLine, + final MatchInjectionsResult injectionResult = matchInjections(injections, grammar, lineText, isFirstLine, linePos, stack, anchorPosition); if (injectionResult == null) { @@ -353,11 +352,11 @@ private IMatchResult matchRuleOrInjections(final Grammar grammar, final OnigStri } // Decide if `matchResult` or `injectionResult` should win - final int matchResultScore = matchResult.getCaptureIndices()[0].start; - final int injectionResultScore = injectionResult.getCaptureIndices()[0].start; + final int matchResultScore = matchResult.captureIndices[0].start; + final int injectionResultScore = injectionResult.captureIndices[0].start; if (injectionResultScore < matchResultScore - || injectionResult.isPriorityMatch() && injectionResultScore == matchResultScore) { + || injectionResult.isPriorityMatch && injectionResultScore == matchResultScore) { // injection won! return injectionResult; } @@ -366,9 +365,10 @@ private IMatchResult matchRuleOrInjections(final Grammar grammar, final OnigStri } @Nullable - private IMatchInjectionsResult matchInjections(final List injections, final Grammar grammar, - final OnigString lineText, - final boolean isFirstLine, final int linePos, final StateStack stack, final int anchorPosition) { + private MatchInjectionsResult matchInjections(final List injections, final Grammar grammar, + final OnigString lineText, final boolean isFirstLine, final int linePos, final StateStack stack, + final int anchorPosition) { + // The lower the better var bestMatchRating = Integer.MAX_VALUE; OnigCaptureIndex[] bestMatchCaptureIndices = null; @@ -377,7 +377,8 @@ private IMatchInjectionsResult matchInjections(final List injections, final var scopes = stack.contentNameScopesList.getScopeNames(); - for (final Injection injection : injections) { + for (int i = 0, len = injections.size(); i < len; i++) { + final var injection = injections.get(i); if (!injection.matches(scopes)) { // injection selector doesn't match stack continue; @@ -413,26 +414,10 @@ private IMatchInjectionsResult matchInjections(final List injections, } if (bestMatchCaptureIndices != null) { - final RuleId matchedRuleId = bestMatchRuleId; - final OnigCaptureIndex[] matchCaptureIndices = bestMatchCaptureIndices; - final boolean matchResultPriority = bestMatchResultPriority == -1; - return new IMatchInjectionsResult() { - - @Override - public RuleId getMatchedRuleId() { - return matchedRuleId; - } - - @Override - public OnigCaptureIndex[] getCaptureIndices() { - return matchCaptureIndices; - } - - @Override - public boolean isPriorityMatch() { - return matchResultPriority; - } - }; + return new MatchInjectionsResult( + bestMatchRuleId, + bestMatchCaptureIndices, + bestMatchResultPriority == -1); } return null; From 8e8fdaf3c81af8cb27b33e6ef8a2352f62b829ec Mon Sep 17 00:00:00 2001 From: sebthom Date: Tue, 17 May 2022 13:41:48 +0200 Subject: [PATCH 32/41] Remove unused scopeName field --- .../tm4e/core/internal/theme/ThemeMatchingTest.java | 5 ++--- .../tm4e/core/internal/grammar/BasicScopeAttributes.java | 8 +++----- .../internal/grammar/BasicScopeAttributesProvider.java | 6 ++---- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java index e3442b6a8..53f749aa4 100644 --- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java +++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java @@ -90,8 +90,7 @@ void testGivesHigherPriorityToParentMatches2() throws Exception { final var root = new AttributedScopeStack(null, "text.html.cshtml", 0); final var parent = new AttributedScopeStack(root, "meta.tag.structure.any.html", 0); final int r = AttributedScopeStack.mergeAttributes(0, parent, - new BasicScopeAttributes("entity.name.tag.structure.any.html", 0, 0, - theme.match("entity.name.tag.structure.any.html"))); + new BasicScopeAttributes(0, 0, theme.match("entity.name.tag.structure.any.html"))); final String color = theme.getColor(EncodedTokenAttributes.getForeground(r)); assertEquals("#300000", color); } @@ -234,7 +233,7 @@ void testMicrosoft_vscode_23460() throws Exception { final int r = AttributedScopeStack.mergeAttributes( 0, parent1, - new BasicScopeAttributes("string.quoted.double.json", 0, 0, theme.match("string.quoted.double.json"))); + new BasicScopeAttributes(0, 0, theme.match("string.quoted.double.json"))); final String color = theme.getColor(EncodedTokenAttributes.getForeground(r)); assertEquals("#FF410D", color); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributes.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributes.java index 70f5f8b55..e2c40a52e 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributes.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributes.java @@ -18,17 +18,15 @@ public final class BasicScopeAttributes { - final String scopeName; final int languageId; final int /*OptionalStandardTokenType*/ tokenType; @Nullable final List themeData; - public BasicScopeAttributes(final String scopeName, final int languageId, - final int /*OptionalStandardTokenType*/ tokenType, - @Nullable final List themeData) { - this.scopeName = scopeName; + public BasicScopeAttributes(final int languageId, + final int /*OptionalStandardTokenType*/ tokenType, + @Nullable final List themeData) { this.languageId = languageId; this.tokenType = tokenType; this.themeData = themeData; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java index 9ad7d2abe..532e022bd 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java @@ -32,7 +32,7 @@ */ final class BasicScopeAttributesProvider { - private static final BasicScopeAttributes NULL_SCOPE_METADATA = new BasicScopeAttributes("", 0, 0, null); + private static final BasicScopeAttributes NULL_SCOPE_METADATA = new BasicScopeAttributes(0, 0, null); private static final Pattern STANDARD_TOKEN_TYPE_REGEXP = Pattern.compile("\\b(comment|string|regex)\\b"); @@ -52,7 +52,6 @@ final class BasicScopeAttributesProvider { this.initialLanguage = initialLanguage; this.themeProvider = themeProvider; this.defaultMetaData = new BasicScopeAttributes( - "", this.initialLanguage, OptionalStandardTokenType.NotSet, List.of(this.themeProvider.getDefaults())); @@ -80,7 +79,6 @@ final class BasicScopeAttributesProvider { void onDidChangeTheme() { this.cache.clear(); this.defaultMetaData = new BasicScopeAttributes( - "", this.initialLanguage, OptionalStandardTokenType.NotSet, List.of(this.themeProvider.getDefaults())); @@ -108,7 +106,7 @@ private BasicScopeAttributes doGetMetadataForScope(final String scopeName) { final int standardTokenType = BasicScopeAttributesProvider._toStandardTokenType(scopeName); final List themeData = this.themeProvider.themeMatch(scopeName); - return new BasicScopeAttributes(scopeName, languageId, standardTokenType, themeData); + return new BasicScopeAttributes(languageId, standardTokenType, themeData); } /** From db50a6159172c7b15c40678b7a275ba84a2a938f Mon Sep 17 00:00:00 2001 From: sebthom Date: Tue, 17 May 2022 16:58:57 +0200 Subject: [PATCH 33/41] Remove unnecessary @Nullable annotations --- .../org/eclipse/tm4e/core/internal/registry/SyncRegistry.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java index 20b069396..07f3b240a 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java @@ -38,8 +38,8 @@ public final class SyncRegistry implements IGrammarRepository, IThemeProvider { private final Map grammars = new HashMap<>(); - private final Map<@Nullable String, IRawGrammar> rawGrammars = new HashMap<>(); - private final Map<@Nullable String, Collection> injectionGrammars = new HashMap<>(); + private final Map rawGrammars = new HashMap<>(); + private final Map> injectionGrammars = new HashMap<>(); private Theme theme; public SyncRegistry(final Theme theme) { From 53610e6dc4e1c4b8d33347f95bcfcde0f3d38d68 Mon Sep 17 00:00:00 2001 From: sebthom Date: Tue, 17 May 2022 17:24:07 +0200 Subject: [PATCH 34/41] Rename fields and methods according upstream --- .../internal/theme/ThemeResolvingTest.java | 6 +- .../grammar/AttributedScopeStack.java | 13 +- .../grammar/BasicScopeAttributesProvider.java | 46 +++---- .../tm4e/core/internal/grammar/Grammar.java | 20 ++- .../core/internal/grammar/StateStack.java | 130 ++++++++++-------- .../core/internal/registry/SyncRegistry.java | 50 ++++--- .../tm4e/core/internal/theme/ColorMap.java | 77 ++++++----- .../tm4e/core/internal/theme/Theme.java | 91 +++++------- .../core/internal/theme/ThemeTrieElement.java | 93 ++++++------- .../core/internal/utils/CompareUtils.java | 54 -------- .../core/internal/utils/MoreCollections.java | 8 ++ .../tm4e/core/internal/utils/StringUtils.java | 84 +++++++++++ 12 files changed, 356 insertions(+), 316 deletions(-) delete mode 100644 org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/CompareUtils.java create mode 100644 org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/StringUtils.java diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeResolvingTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeResolvingTest.java index 7213f6e62..30e9a3913 100644 --- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeResolvingTest.java +++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeResolvingTest.java @@ -16,7 +16,7 @@ import java.util.List; -import org.eclipse.tm4e.core.internal.utils.CompareUtils; +import org.eclipse.tm4e.core.internal.utils.StringUtils; import org.junit.jupiter.api.Test; /** @@ -32,7 +32,7 @@ public class ThemeResolvingTest extends AbstractThemeTest { private static void assertStrArrCmp(final String testCase, final List a, final List b, final int expected) { - assertEquals(expected, CompareUtils.strArrCmp(a, b), testCase); + assertEquals(expected, StringUtils.strArrCmp(a, b), testCase); } /** @@ -79,7 +79,7 @@ public void testThemeParsingCanParse() throws Exception { @Test public void testStrcmpWorks() { final var actual = list("bar", "z", "zu", "a", "ab", ""); - actual.sort(CompareUtils::strcmp); + actual.sort(StringUtils::strcmp); final var expected = list("", "a", "ab", "bar", "z", "zu"); assertArrayEquals(expected.toArray(), actual.toArray()); diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/AttributedScopeStack.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/AttributedScopeStack.java index f856df975..3564d3b41 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/AttributedScopeStack.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/AttributedScopeStack.java @@ -115,8 +115,8 @@ private static boolean matches(@Nullable AttributedScopeStack target, @Nullable public static int mergeAttributes( final int existingTokenAttributes, @Nullable final AttributedScopeStack scopesList, - @Nullable final BasicScopeAttributes source) { - if (source == null) { + @Nullable final BasicScopeAttributes basicScopeAttributes) { + if (basicScopeAttributes == null) { return existingTokenAttributes; } @@ -124,9 +124,9 @@ public static int mergeAttributes( int foreground = 0; int background = 0; - if (source.themeData != null) { + if (basicScopeAttributes.themeData != null) { // Find the first themeData that matches - for (final ThemeTrieElementRule themeData : source.themeData) { + for (final ThemeTrieElementRule themeData : basicScopeAttributes.themeData) { if (matches(scopesList, themeData.parentScopes)) { fontStyle = themeData.fontStyle; foreground = themeData.foreground; @@ -136,7 +136,8 @@ public static int mergeAttributes( } } - return EncodedTokenAttributes.set(existingTokenAttributes, source.languageId, source.tokenType, null, fontStyle, + return EncodedTokenAttributes.set(existingTokenAttributes, basicScopeAttributes.languageId, + basicScopeAttributes.tokenType, null, fontStyle, foreground, background); } @@ -145,7 +146,7 @@ private static AttributedScopeStack push(AttributedScopeStack target, final Gram final Iterable scopes) { for (final String scope : scopes) { final var rawMetadata = grammar.getMetadataForScope(scope); - final int metadata = AttributedScopeStack.mergeAttributes(target.tokenAttributes, target, rawMetadata); + final int metadata = mergeAttributes(target.tokenAttributes, target, rawMetadata); target = new AttributedScopeStack(target, scope, metadata); } return target; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java index 532e022bd..f5b0847eb 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java @@ -32,26 +32,23 @@ */ final class BasicScopeAttributesProvider { - private static final BasicScopeAttributes NULL_SCOPE_METADATA = new BasicScopeAttributes(0, 0, null); - - private static final Pattern STANDARD_TOKEN_TYPE_REGEXP = Pattern.compile("\\b(comment|string|regex)\\b"); - private final int initialLanguage; private final IThemeProvider themeProvider; private final Map cache = new HashMap<>(); - private BasicScopeAttributes defaultMetaData; - - private final Map embeddedLanguages = new HashMap<>(); + private BasicScopeAttributes _defaultAttributes; + private final Map _embeddedLanguages = new HashMap<>(); @Nullable private Pattern embeddedLanguagesRegex; - BasicScopeAttributesProvider(final int initialLanguage, final IThemeProvider themeProvider, + BasicScopeAttributesProvider( + final int initialLanguage, + final IThemeProvider themeProvider, @Nullable final Map embeddedLanguages) { this.initialLanguage = initialLanguage; this.themeProvider = themeProvider; - this.defaultMetaData = new BasicScopeAttributes( + this._defaultAttributes = new BasicScopeAttributes( this.initialLanguage, OptionalStandardTokenType.NotSet, List.of(this.themeProvider.getDefaults())); @@ -59,11 +56,11 @@ final class BasicScopeAttributesProvider { // embeddedLanguages handling if (embeddedLanguages != null) { // If embeddedLanguages are configured, fill in `this.embeddedLanguages` - this.embeddedLanguages.putAll(embeddedLanguages); + this._embeddedLanguages.putAll(embeddedLanguages); } // create the regex - final var escapedScopes = this.embeddedLanguages.keySet().stream() + final var escapedScopes = this._embeddedLanguages.keySet().stream() .map(RegexSource::escapeRegExpCharacters) .collect(Collectors.toList()); if (escapedScopes.isEmpty()) { @@ -78,19 +75,19 @@ final class BasicScopeAttributesProvider { void onDidChangeTheme() { this.cache.clear(); - this.defaultMetaData = new BasicScopeAttributes( + this._defaultAttributes = new BasicScopeAttributes( this.initialLanguage, OptionalStandardTokenType.NotSet, List.of(this.themeProvider.getDefaults())); } - BasicScopeAttributes getDefaultMetadata() { - return this.defaultMetaData; + BasicScopeAttributes getDefaultAttributes() { + return this._defaultAttributes; } - BasicScopeAttributes getMetadataForScope(@Nullable final String scopeName) { + BasicScopeAttributes getBasicScopeAttributes(@Nullable final String scopeName) { if (scopeName == null) { - return BasicScopeAttributesProvider.NULL_SCOPE_METADATA; + return BasicScopeAttributesProvider._NULL_SCOPE_METADATA; } var value = this.cache.get(scopeName); if (value != null) { @@ -102,35 +99,33 @@ BasicScopeAttributes getMetadataForScope(@Nullable final String scopeName) { } private BasicScopeAttributes doGetMetadataForScope(final String scopeName) { - final int languageId = this.scopeToLanguage(scopeName); + final int languageId = this._scopeToLanguage(scopeName); final int standardTokenType = BasicScopeAttributesProvider._toStandardTokenType(scopeName); final List themeData = this.themeProvider.themeMatch(scopeName); return new BasicScopeAttributes(languageId, standardTokenType, themeData); } + private static final BasicScopeAttributes _NULL_SCOPE_METADATA = new BasicScopeAttributes(0, 0, null); + /** * Given a produced TM scope, return the language that token describes or null if unknown. * e.g. source.html => html, source.css.embedded.html => css, punctuation.definition.tag.html => null */ - private int scopeToLanguage(@Nullable final String scope) { - if (scope == null) { - return 0; - } - + private int _scopeToLanguage(final String scopeName) { final var embeddedLanguagesRegex = this.embeddedLanguagesRegex; if (embeddedLanguagesRegex == null) { // no scopes registered return 0; } - final var m = embeddedLanguagesRegex.matcher(scope); + final var m = embeddedLanguagesRegex.matcher(scopeName); if (!m.find()) { // no scopes matched return 0; } - return embeddedLanguages.getOrDefault(m.group(1), 0); + return _embeddedLanguages.getOrDefault(m.group(1), 0); } private static int /*OptionalStandardTokenType*/ _toStandardTokenType(final String scopeName) { @@ -147,4 +142,7 @@ private int scopeToLanguage(@Nullable final String scope) { default -> throw new TMException("Unexpected match for standard token type: " + group); }; } + + private static final Pattern STANDARD_TOKEN_TYPE_REGEXP = Pattern + .compile("\\b(comment|string|regex|meta\\.embedded)\\b"); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java index eed554afe..4376260cf 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java @@ -66,10 +66,11 @@ public final class Grammar implements IGrammar, IRuleFactoryHelper { private final Map includedGrammars = new HashMap<>(); private final IGrammarRepository _grammarRepository; private final IRawGrammar _grammar; + final IThemeProvider themeProvider; @Nullable private List _injections; - private final BasicScopeAttributesProvider _scopeMetadataProvider; + private final BasicScopeAttributesProvider _basicScopeAttributesProvider; private final List _tokenTypeMatchers = new ArrayList<>(); @Nullable @@ -86,11 +87,14 @@ public Grammar( final IThemeProvider themeProvider) { this.rootScopeName = rootScopeName; - this._scopeMetadataProvider = new BasicScopeAttributesProvider(initialLanguage, themeProvider, + this._basicScopeAttributesProvider = new BasicScopeAttributesProvider( + initialLanguage, + themeProvider, embeddedLanguages); this._grammarRepository = grammarRepository; this._grammar = initGrammar(grammar, null); this.balancedBracketSelectors = balancedBracketSelectors; + this.themeProvider = themeProvider; if (tokenTypes != null) { for (final var entry : tokenTypes.entrySet()) { @@ -104,11 +108,11 @@ public Grammar( } public void onDidChangeTheme() { - this._scopeMetadataProvider.onDidChangeTheme(); + this._basicScopeAttributesProvider.onDidChangeTheme(); } BasicScopeAttributes getMetadataForScope(final String scope) { - return this._scopeMetadataProvider.getMetadataForScope(scope); + return this._basicScopeAttributesProvider.getBasicScopeAttributes(scope); } private void collectInjections(final List result, final String selector, final IRawRule rule, @@ -287,7 +291,7 @@ private T _tokenize( boolean isFirstLine; if (prevState == null || prevState.equals(StateStack.NULL)) { isFirstLine = true; - final var rawDefaultMetadata = this._scopeMetadataProvider.getDefaultMetadata(); + final var rawDefaultMetadata = this._basicScopeAttributesProvider.getDefaultAttributes(); final var themeData = rawDefaultMetadata.themeData; final var defaultTheme = themeData == null ? null : themeData.get(0); final int defaultMetadata = EncodedTokenAttributes.set( @@ -299,9 +303,11 @@ private T _tokenize( defaultTheme.foreground, defaultTheme.background); - final var rootScopeName = this.getRule(rootId).getName(null, null); + final var rootScopeName = this.getRule(rootId).getName( + null, + null); - final var rawRootMetadata = this._scopeMetadataProvider.getMetadataForScope(rootScopeName); + final var rawRootMetadata = this._basicScopeAttributesProvider.getBasicScopeAttributes(rootScopeName); final int rootMetadata = AttributedScopeStack.mergeAttributes(defaultMetadata, null, rawRootMetadata); final var scopeList = new AttributedScopeStack( diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StateStack.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StateStack.java index d90b0b93f..6b8a507dc 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StateStack.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StateStack.java @@ -37,38 +37,45 @@ */ public final class StateStack implements IStateStack { - public static final StateStack NULL = new StateStack(null, RuleId.NO_RULE, 0, 0, false, null, - new AttributedScopeStack(null, "", 0), new AttributedScopeStack(null, "", 0)); + public static final StateStack NULL = new StateStack( + null, + RuleId.NO_RULE, + 0, + 0, + false, + null, + new AttributedScopeStack(null, "", 0), + new AttributedScopeStack(null, "", 0)); /** * The position on the current line where this state was pushed. * This is relevant only while tokenizing a line, to detect endless loops. * Its value is meaningless across lines. */ - private int enterPosition; + private int _enterPos; /** * The captured anchor position when this stack element was pushed. * This is relevant only while tokenizing a line, to restore the anchor position when popping. * Its value is meaningless across lines. */ - private int anchorPos; + private int _anchorPos; /** - * The previous state on the stack (or null for the root state). + * The depth of the stack. */ - @Nullable - final StateStack parent; + private final int depth; /** - * The depth of the stack. + * The previous state on the stack (or null for the root state). */ - final int depth; + @Nullable + private final StateStack parent; /** * The state (rule) that this element represents. */ - final RuleId ruleId; + private final RuleId ruleId; /** * The state has entered and captured \n. This means that the next line should have an anchorPosition of 0. @@ -101,21 +108,41 @@ public final class StateStack implements IStateStack { @Nullable final String endRule, final AttributedScopeStack nameScopesList, final AttributedScopeStack contentNameScopesList) { + this.parent = parent; - depth = this.parent != null ? this.parent.depth + 1 : 1; this.ruleId = ruleId; - enterPosition = enterPos; - this.anchorPos = anchorPos; + depth = this.parent != null ? this.parent.depth + 1 : 1; + _enterPos = enterPos; + this._anchorPos = anchorPos; this.beginRuleCapturedEOL = beginRuleCapturedEOL; this.endRule = endRule; this.nameScopesList = nameScopesList; this.contentNameScopesList = contentNameScopesList; } + public boolean equals(@Nullable final StateStack other) { + if (other == null) { + return false; + } + return _equals(this, other); + } + + private static boolean _equals(final StateStack a, final StateStack b) { + if (a == b) { + return true; + } + if (!_structuralEquals(a, b)) { + return false; + } + return a.contentNameScopesList.equals(b.contentNameScopesList); + } + /** * A structural equals check. Does not take into account `scopes`. */ - private static boolean structuralEquals(@Nullable StateStack a, @Nullable StateStack b) { + private static boolean _structuralEquals( + @Nullable StateStack a, + @Nullable StateStack b) { do { if (a == b) { return true; @@ -131,7 +158,9 @@ private static boolean structuralEquals(@Nullable StateStack a, @Nullable StateS return false; } - if (a.depth != b.depth || !Objects.equals(a.ruleId, b.ruleId) || !Objects.equals(a.endRule, b.endRule)) { + if (a.depth != b.depth + || !Objects.equals(a.ruleId, b.ruleId) + || !Objects.equals(a.endRule, b.endRule)) { return false; } @@ -141,25 +170,6 @@ private static boolean structuralEquals(@Nullable StateStack a, @Nullable StateS } while (true); } - @SuppressWarnings("null") - private static boolean equals(@Nullable final StateStack a, @Nullable final StateStack b) { - if (a == b) { - return true; - } - if (!structuralEquals(a, b)) { - return false; - } - return a.contentNameScopesList.equals(b.contentNameScopesList); - } - - @Override - public boolean equals(@Nullable final Object other) { - if (other == null || other.getClass() != StateStack.class) { - return false; - } - return equals(this, (StateStack) other); - } - @Override public int getDepth() { return depth; @@ -177,8 +187,8 @@ public int hashCode() { void reset() { StateStack el = this; while (el != null) { - el.enterPosition = -1; - el.anchorPos = -1; + el._enterPos = -1; + el._anchorPos = -1; el = el.parent; } } @@ -194,14 +204,16 @@ StateStack safePop() { return this; } - StateStack push(final RuleId ruleId, + StateStack push( + final RuleId ruleId, final int enterPos, final int anchorPos, final boolean beginRuleCapturedEOL, @Nullable final String endRule, final AttributedScopeStack nameScopesList, final AttributedScopeStack contentNameScopesList) { - return new StateStack(this, + return new StateStack( + this, ruleId, enterPos, anchorPos, @@ -211,40 +223,40 @@ StateStack push(final RuleId ruleId, contentNameScopesList); } - int getAnchorPos() { - return anchorPos; + int getEnterPos() { + return _enterPos; } - int getEnterPos() { - return enterPosition; + int getAnchorPos() { + return _anchorPos; } Rule getRule(final IRuleRegistry grammar) { return grammar.getRule(ruleId); } - private void appendString(final List res) { - if (parent != null) { - parent.appendString(res); - } - // , TODO-${this.nameScopesList}, TODO-${this.contentNameScopesList})`; - res.add("(" + ruleId + ")"); - } - @Override public String toString() { final var r = new ArrayList(); - appendString(r); + _writeString(r); return '[' + String.join(", ", r) + ']'; } + private void _writeString(final List res) { + if (parent != null) { + parent._writeString(res); + } + // , TODO-${this.nameScopesList}, TODO-${this.contentNameScopesList})`; + res.add("(" + ruleId + ")"); + } + StateStack withContentNameScopesList(final AttributedScopeStack contentNameScopesList) { if (this.contentNameScopesList.equals(contentNameScopesList)) { return this; } return castNonNull(this.parent).push(this.ruleId, - this.enterPosition, - this.anchorPos, + this._enterPos, + this._anchorPos, this.beginRuleCapturedEOL, this.endRule, this.nameScopesList, @@ -255,19 +267,23 @@ StateStack withEndRule(final String endRule) { if (this.endRule != null && this.endRule.equals(endRule)) { return this; } - return new StateStack(this.parent, + return new StateStack( + this.parent, this.ruleId, - this.enterPosition, - this.anchorPos, + this._enterPos, + this._anchorPos, this.beginRuleCapturedEOL, endRule, this.nameScopesList, this.contentNameScopesList); } + /** + * Used to warn of endless loops + */ boolean hasSameRuleAs(final StateStack other) { var el = this; - while (el != null && el.enterPosition == other.enterPosition) { + while (el != null && el._enterPos == other._enterPos) { if (el.ruleId == other.ruleId) { return true; } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java index 07f3b240a..05a72cba3 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java @@ -37,46 +37,45 @@ */ public final class SyncRegistry implements IGrammarRepository, IThemeProvider { - private final Map grammars = new HashMap<>(); - private final Map rawGrammars = new HashMap<>(); - private final Map> injectionGrammars = new HashMap<>(); - private Theme theme; + private final Map _grammars = new HashMap<>(); + private final Map _rawGrammars = new HashMap<>(); + private final Map> _injectionGrammars = new HashMap<>(); + private Theme _theme; public SyncRegistry(final Theme theme) { - this.theme = theme; + this._theme = theme; } public void setTheme(final Theme theme) { - this.theme = theme; - this.grammars.values().forEach(Grammar::onDidChangeTheme); + this._theme = theme; + this._grammars.values().forEach(Grammar::onDidChangeTheme); } public List getColorMap() { - return this.theme.getColorMap(); + return this._theme.getColorMap(); } /** * Add `grammar` to registry and return a list of referenced scope names */ - public void addGrammar(final IRawGrammar grammar, - @Nullable final Collection injectionScopeNames) { - this.rawGrammars.put(grammar.getScopeName(), grammar); + public void addGrammar(final IRawGrammar grammar, @Nullable final Collection injectionScopeNames) { + this._rawGrammars.put(grammar.getScopeName(), grammar); if (injectionScopeNames != null) { - this.injectionGrammars.put(grammar.getScopeName(), injectionScopeNames); + this._injectionGrammars.put(grammar.getScopeName(), injectionScopeNames); } } @Override @Nullable public IRawGrammar lookup(final String scopeName) { - return this.rawGrammars.get(scopeName); + return this._rawGrammars.get(scopeName); } @Override @Nullable public Collection injections(final String targetScope) { - return this.injectionGrammars.get(targetScope); + return this._injectionGrammars.get(targetScope); } /** @@ -84,7 +83,7 @@ public Collection injections(final String targetScope) { */ @Override public ThemeTrieElementRule getDefaults() { - return this.theme.getDefaults(); + return this._theme.getDefaults(); } /** @@ -92,27 +91,34 @@ public ThemeTrieElementRule getDefaults() { */ @Override public List themeMatch(final String scopeName) { - return this.theme.match(scopeName); + return this._theme.match(scopeName); } /** * Lookup a grammar. */ @Nullable - public IGrammar grammarForScopeName(final String scopeName, + public IGrammar grammarForScopeName( + final String scopeName, final int initialLanguage, @Nullable final Map embeddedLanguages, @Nullable final Map tokenTypes, @Nullable final BalancedBracketSelectors balancedBracketSelectors) { - if (!this.grammars.containsKey(scopeName)) { + if (!this._grammars.containsKey(scopeName)) { final var rawGrammar = lookup(scopeName); if (rawGrammar == null) { return null; } - this.grammars.put(scopeName, - new Grammar(scopeName, rawGrammar, initialLanguage, embeddedLanguages, tokenTypes, - balancedBracketSelectors, this, this)); + this._grammars.put(scopeName, new Grammar( + scopeName, + rawGrammar, + initialLanguage, + embeddedLanguages, + tokenTypes, + balancedBracketSelectors, + this, + this)); } - return this.grammars.get(scopeName); + return this._grammars.get(scopeName); } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ColorMap.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ColorMap.java index 3576d1f8b..873d54ebf 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ColorMap.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ColorMap.java @@ -11,65 +11,67 @@ */ package org.eclipse.tm4e.core.internal.theme; -import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*; - import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import java.util.Objects; import org.eclipse.jdt.annotation.Nullable; import org.eclipse.tm4e.core.TMException; -public class ColorMap { +/** + * @see + * https://github.com/Microsoft/vscode-textmate/blob/main/src/theme.ts + */ +public final class ColorMap { - private boolean isFrozen; - private int lastColorId = 0; - private final List id2color = new ArrayList<>(); - private final Map color2id = new LinkedHashMap<>(); + private boolean _isFrozen; + private int _lastColorId = 0; + private final List _id2color = new ArrayList<>(); + private final Map _color2id = new LinkedHashMap<>(); public ColorMap() { this(null); } - public ColorMap(@Nullable final List colorMap) { - if (colorMap != null) { - this.isFrozen = true; - for (int i = 0, len = colorMap.size(); i < len; i++) { - this.color2id.put(colorMap.get(i), i); - this.id2color.add(colorMap.get(i)); + public ColorMap(@Nullable final List _colorMap) { + if (_colorMap != null) { + this._isFrozen = true; + for (int i = 0, len = _colorMap.size(); i < len; i++) { + this._color2id.put(_colorMap.get(i), i); + this._id2color.add(_colorMap.get(i)); } } else { - this.isFrozen = false; + this._isFrozen = false; } } - public int getId(@Nullable String color) { - if (color == null) { + public int getId(@Nullable final String _color) { + if (_color == null) { return 0; } - color = color.toUpperCase(); - Integer value = color2id.get(color); + final var color = _color.toUpperCase(); + Integer value = _color2id.get(color); if (value != null) { return value; } - if (this.isFrozen) { + if (this._isFrozen) { throw new TMException("Missing color in color map - " + color); } - value = ++lastColorId; - color2id.put(castNonNull(color), value); - if (value >= id2color.size()) { - id2color.add(castNonNull(color)); + value = ++this._lastColorId; + _color2id.put(color, value); + if (value >= _id2color.size()) { + _id2color.add(color); } else { - id2color.set(value, castNonNull(color)); + _id2color.set(value, color); } return value; } @Nullable public String getColor(final int id) { - for (final var entry : color2id.entrySet()) { + for (final var entry : _color2id.entrySet()) { if (id == entry.getValue()) { return entry.getKey(); } @@ -78,16 +80,7 @@ public String getColor(final int id) { } public List getColorMap() { - return new ArrayList<>(color2id.keySet()); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + color2id.hashCode(); - result = prime * result + lastColorId; - return result; + return new ArrayList<>(_color2id.keySet()); } @Override @@ -102,6 +95,16 @@ public boolean equals(@Nullable final Object obj) { return false; } final ColorMap other = (ColorMap) obj; - return Objects.equals(color2id, other.color2id) && lastColorId == other.lastColorId; + return _lastColorId == other._lastColorId + && _color2id.equals(other._color2id); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + _lastColorId; + result = prime * result + _color2id.hashCode(); + return result; } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java index 5fe800c1f..6b302355c 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java @@ -12,6 +12,7 @@ package org.eclipse.tm4e.core.internal.theme; import static org.eclipse.tm4e.core.internal.utils.MoreCollections.*; +import static org.eclipse.tm4e.core.internal.utils.StringUtils.*; import java.util.ArrayList; import java.util.Collections; @@ -19,10 +20,8 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import java.util.regex.Pattern; import org.eclipse.jdt.annotation.Nullable; -import org.eclipse.tm4e.core.internal.utils.CompareUtils; import com.google.common.base.Splitter; import com.google.common.collect.Lists; @@ -34,47 +33,46 @@ * "https://github.com/microsoft/vscode-textmate/blob/9157c7f869219dbaf9a5a5607f099c00fe694a29/src/theme.ts#L8"> * github.com/Microsoft/vscode-textmate/blob/master/src/theme.ts */ -public class Theme { +public final class Theme { private static final Splitter BY_COMMA_SPLITTER = Splitter.on(','); private static final Splitter BY_SPACE_SPLITTER = Splitter.on(' '); - private static final Pattern RRGGBB = Pattern.compile("^#[0-9a-f]{6}", Pattern.CASE_INSENSITIVE); - private static final Pattern RRGGBBAA = Pattern.compile("^#[0-9a-f]{8}", Pattern.CASE_INSENSITIVE); - private static final Pattern RGB = Pattern.compile("^#[0-9a-f]{3}", Pattern.CASE_INSENSITIVE); - private static final Pattern RGBA = Pattern.compile("^#[0-9a-f]{4}", Pattern.CASE_INSENSITIVE); - - public static Theme createFromRawTheme(@Nullable final IRawTheme source, @Nullable final List colorMap) { + public static Theme createFromRawTheme( + @Nullable final IRawTheme source, + @Nullable final List colorMap) { return createFromParsedTheme(parseTheme(source), colorMap); } - public static Theme createFromParsedTheme(final List source, + public static Theme createFromParsedTheme( + final List source, @Nullable final List colorMap) { return resolveParsedThemeRules(source, colorMap); } - private final ColorMap colorMap; - private final ThemeTrieElement root; - private final ThemeTrieElementRule defaults; private final Map> _cachedMatchRoot = new HashMap<>(); + private final ColorMap _colorMap; + private final ThemeTrieElementRule _defaults; + private final ThemeTrieElement _root; + public Theme(final ColorMap colorMap, final ThemeTrieElementRule defaults, final ThemeTrieElement root) { - this.colorMap = colorMap; - this.root = root; - this.defaults = defaults; + this._colorMap = colorMap; + this._root = root; + this._defaults = defaults; } public List getColorMap() { - return this.colorMap.getColorMap(); + return this._colorMap.getColorMap(); } public ThemeTrieElementRule getDefaults() { - return this.defaults; + return this._defaults; } public List match(final String scopeName) { if (!this._cachedMatchRoot.containsKey(scopeName)) { - this._cachedMatchRoot.put(scopeName, this.root.match(scopeName)); + this._cachedMatchRoot.put(scopeName, this._root.match(scopeName)); } return this._cachedMatchRoot.get(scopeName); } @@ -121,12 +119,12 @@ public static List parseTheme(@Nullable final IRawTheme source) } int fontStyle = FontStyle.NotSet; - final Object settingsFontStyle = entrySetting.getFontStyle(); + final var settingsFontStyle = entrySetting.getFontStyle(); if (settingsFontStyle instanceof final String style) { fontStyle = FontStyle.None; - final Iterable segments = BY_SPACE_SPLITTER.split(style); - for (final String segment : segments) { + final var segments = BY_SPACE_SPLITTER.split(style); + for (final var segment : segments) { switch (segment) { case "italic": fontStyle = fontStyle | FontStyle.Italic; @@ -194,11 +192,11 @@ public static Theme resolveParsedThemeRules(final List _parsedT // Sort rules lexicographically, and then by index if necessary parsedThemeRules.sort((a, b) -> { - int r = CompareUtils.strcmp(a.scope, b.scope); + int r = strcmp(a.scope, b.scope); if (r != 0) { return r; } - r = CompareUtils.strArrCmp(a.parentScopes, b.parentScopes); + r = strArrCmp(a.parentScopes, b.parentScopes); if (r != 0) { return r; } @@ -227,7 +225,8 @@ public static Theme resolveParsedThemeRules(final List _parsedT final var root = new ThemeTrieElement(new ThemeTrieElementRule(0, null, FontStyle.NotSet, 0, 0), Collections.emptyList()); - for (final var rule : parsedThemeRules) { + for (int i = 0, len = parsedThemeRules.size(); i < len; i++) { + final var rule = parsedThemeRules.get(i); root.insert(0, rule.scope, rule.parentScopes, rule.fontStyle, colorMap.getId(rule.foreground), colorMap.getId(rule.background)); } @@ -235,46 +234,18 @@ public static Theme resolveParsedThemeRules(final List _parsedT return new Theme(colorMap, defaults, root); } - private static boolean isValidHexColor(final String hex) { - if (hex.isEmpty()) { - return false; - } - - if (RRGGBB.matcher(hex).matches()) { - // #rrggbb - return true; - } - - if (RRGGBBAA.matcher(hex).matches()) { - // #rrggbbaa - return true; - } - - if (RGB.matcher(hex).matches()) { - // #rgb - return true; - } - - if (RGBA.matcher(hex).matches()) { - // #rgba - return true; - } - - return false; - } - @Nullable public String getColor(final int id) { - return this.colorMap.getColor(id); + return this._colorMap.getColor(id); } @Override public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + colorMap.hashCode(); - result = prime * result + defaults.hashCode(); - result = prime * result + root.hashCode(); + result = prime * result + _colorMap.hashCode(); + result = prime * result + _defaults.hashCode(); + result = prime * result + _root.hashCode(); return result; } @@ -287,8 +258,8 @@ public boolean equals(@Nullable final Object obj) { return false; } final Theme other = (Theme) obj; - return Objects.equals(colorMap, other.colorMap) - && Objects.equals(defaults, other.defaults) - && Objects.equals(root, other.root); + return Objects.equals(_colorMap, other._colorMap) + && Objects.equals(_defaults, other._defaults) + && Objects.equals(_root, other._root); } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeTrieElement.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeTrieElement.java index cf55af5d4..68866e6b5 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeTrieElement.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeTrieElement.java @@ -11,50 +11,57 @@ */ package org.eclipse.tm4e.core.internal.theme; +import static org.eclipse.tm4e.core.internal.utils.MoreCollections.*; +import static org.eclipse.tm4e.core.internal.utils.StringUtils.*; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.eclipse.jdt.annotation.Nullable; -import org.eclipse.tm4e.core.internal.utils.CompareUtils; /** * @see * github.com/Microsoft/vscode-textmate/blob/master/src/theme.ts */ -public class ThemeTrieElement { +public final class ThemeTrieElement { - private final ThemeTrieElementRule mainRule; - private final List rulesWithParentScopes; - private final Map children; + private final ThemeTrieElementRule _mainRule; + private final List _rulesWithParentScopes; + private final Map _children; public ThemeTrieElement(final ThemeTrieElementRule mainRule) { this(mainRule, new ArrayList<>(), new HashMap<>()); } - public ThemeTrieElement(final ThemeTrieElementRule mainRule, - final List rulesWithParentScopes) { + public ThemeTrieElement( + final ThemeTrieElementRule mainRule, + final List rulesWithParentScopes) { + this(mainRule, rulesWithParentScopes, new HashMap<>()); } - public ThemeTrieElement(final ThemeTrieElementRule mainRule, final List rulesWithParentScopes, - final Map children) { - this.mainRule = mainRule; - this.rulesWithParentScopes = rulesWithParentScopes; - this.children = children; + public ThemeTrieElement( + final ThemeTrieElementRule mainRule, + final List rulesWithParentScopes, + final Map children) { + + this._mainRule = mainRule; + this._rulesWithParentScopes = rulesWithParentScopes; + this._children = children; } - private static List sortBySpecificity(final List arr) { + private static List _sortBySpecificity(final List arr) { if (arr.size() == 1) { return arr; } - arr.sort(ThemeTrieElement::cmpBySpecificity); + arr.sort(ThemeTrieElement::_cmpBySpecificity); return arr; } - private static int cmpBySpecificity(final ThemeTrieElementRule a, final ThemeTrieElementRule b) { + private static int _cmpBySpecificity(final ThemeTrieElementRule a, final ThemeTrieElementRule b) { if (a.scopeDepth == b.scopeDepth) { final var aParentScopes = a.parentScopes; final var bParentScopes = b.parentScopes; @@ -80,10 +87,7 @@ private static int cmpBySpecificity(final ThemeTrieElementRule a, final ThemeTri public List match(final String scope) { if ("".equals(scope)) { - final var arr = new ArrayList(); - arr.add(this.mainRule); - arr.addAll(this.rulesWithParentScopes); - return ThemeTrieElement.sortBySpecificity(arr); + return ThemeTrieElement._sortBySpecificity(asArrayList(this._mainRule, this._rulesWithParentScopes)); } final int dotIndex = scope.indexOf('.'); @@ -97,18 +101,15 @@ public List match(final String scope) { tail = scope.substring(dotIndex + 1); } - if (this.children.containsKey(head)) { - return this.children.get(head).match(tail); + if (this._children.containsKey(head)) { + return this._children.get(head).match(tail); } - final var arr = new ArrayList(); - arr.add(this.mainRule); - arr.addAll(this.rulesWithParentScopes); - return ThemeTrieElement.sortBySpecificity(arr); + return ThemeTrieElement._sortBySpecificity(asArrayList(this._mainRule, this._rulesWithParentScopes)); } public void insert(final int scopeDepth, final String scope, @Nullable final List parentScopes, - final int fontStyle, final int foreground, final int background) { + final int fontStyle, final int foreground, final int background) { if (scope.isEmpty()) { this.doInsertHere(scopeDepth, parentScopes, fontStyle, foreground, background); return; @@ -126,29 +127,29 @@ public void insert(final int scopeDepth, final String scope, @Nullable final Lis } ThemeTrieElement child; - if (this.children.containsKey(head)) { - child = this.children.get(head); + if (this._children.containsKey(head)) { + child = this._children.get(head); } else { - child = new ThemeTrieElement(this.mainRule.clone(), - ThemeTrieElementRule.cloneArr(this.rulesWithParentScopes)); - this.children.put(head, child); + child = new ThemeTrieElement(this._mainRule.clone(), + ThemeTrieElementRule.cloneArr(this._rulesWithParentScopes)); + this._children.put(head, child); } child.insert(scopeDepth + 1, tail, parentScopes, fontStyle, foreground, background); } private void doInsertHere(final int scopeDepth, @Nullable final List parentScopes, int fontStyle, - int foreground, int background) { + int foreground, int background) { if (parentScopes == null) { // Merge into the main rule - this.mainRule.acceptOverwrite(scopeDepth, fontStyle, foreground, background); + this._mainRule.acceptOverwrite(scopeDepth, fontStyle, foreground, background); return; } // Try to merge into existing rule - for (final ThemeTrieElementRule rule : this.rulesWithParentScopes) { - if (CompareUtils.strArrCmp(rule.parentScopes, parentScopes) == 0) { + for (final ThemeTrieElementRule rule : this._rulesWithParentScopes) { + if (strArrCmp(rule.parentScopes, parentScopes) == 0) { // bingo! => we get to merge this into an existing one rule.acceptOverwrite(scopeDepth, fontStyle, foreground, background); return; @@ -159,26 +160,26 @@ private void doInsertHere(final int scopeDepth, @Nullable final List par // Inherit from main rule if (fontStyle == FontStyle.NotSet) { - fontStyle = this.mainRule.fontStyle; + fontStyle = this._mainRule.fontStyle; } if (foreground == 0) { - foreground = this.mainRule.foreground; + foreground = this._mainRule.foreground; } if (background == 0) { - background = this.mainRule.background; + background = this._mainRule.background; } - this.rulesWithParentScopes.add( - new ThemeTrieElementRule(scopeDepth, parentScopes, fontStyle, foreground, background)); + this._rulesWithParentScopes.add( + new ThemeTrieElementRule(scopeDepth, parentScopes, fontStyle, foreground, background)); } @Override public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + children.hashCode(); - result = prime * result + mainRule.hashCode(); - result = prime * result + rulesWithParentScopes.hashCode(); + result = prime * result + _children.hashCode(); + result = prime * result + _mainRule.hashCode(); + result = prime * result + _rulesWithParentScopes.hashCode(); return result; } @@ -189,8 +190,8 @@ public boolean equals(@Nullable final Object obj) { if (obj == null || getClass() != obj.getClass()) return false; final ThemeTrieElement other = (ThemeTrieElement) obj; - return children.equals(other.children) - && mainRule.equals(other.mainRule) - && rulesWithParentScopes.equals(other.rulesWithParentScopes); + return _children.equals(other._children) + && _mainRule.equals(other._mainRule) + && _rulesWithParentScopes.equals(other._rulesWithParentScopes); } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/CompareUtils.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/CompareUtils.java deleted file mode 100644 index 9227e3ca0..000000000 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/CompareUtils.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.eclipse.tm4e.core.internal.utils; - -import java.util.List; - -import org.eclipse.jdt.annotation.Nullable; - -public final class CompareUtils { - - public static int strcmp(@Nullable final String a, @Nullable final String b) { - if (a == null && b == null) { - return 0; - } - if (a == null) { - return -1; - } - if (b == null) { - return 1; - } - final int result = a.compareTo(b); - if (result < 0) { - return -1; - } else if (result > 0) { - return 1; - } - return 0; - } - - public static int strArrCmp(@Nullable final List a, @Nullable final List b) { - if (a == null && b == null) { - return 0; - } - if (a == null) { - return -1; - } - if (b == null) { - return 1; - } - final int len1 = a.size(); - final int len2 = b.size(); - if (len1 == len2) { - for (int i = 0; i < len1; i++) { - final int res = strcmp(a.get(i), b.get(i)); - if (res != 0) { - return res; - } - } - return 0; - } - return len1 - len2; - } - - private CompareUtils() { - } -} diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/MoreCollections.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/MoreCollections.java index edb5b8976..010f7bfbf 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/MoreCollections.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/MoreCollections.java @@ -12,6 +12,7 @@ */ package org.eclipse.tm4e.core.internal.utils; +import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -19,6 +20,13 @@ public final class MoreCollections { + public static List asArrayList(final T firstItem, final List moreItems) { + final var list = new ArrayList(); + list.add(firstItem); + list.addAll(moreItems); + return list; + } + @Nullable public static T findLastElement(@Nullable final List list) { if (list == null || list.isEmpty()) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/StringUtils.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/StringUtils.java new file mode 100644 index 000000000..1b3ef2460 --- /dev/null +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/StringUtils.java @@ -0,0 +1,84 @@ +package org.eclipse.tm4e.core.internal.utils; + +import java.util.List; +import java.util.regex.Pattern; + +import org.eclipse.jdt.annotation.Nullable; + +/** + * @see + * https://github.com/Microsoft/vscode-textmate/blob/main/src/utils.ts + */ +public final class StringUtils { + + private static final Pattern RRGGBB = Pattern.compile("^#[0-9a-f]{6}", Pattern.CASE_INSENSITIVE); + private static final Pattern RRGGBBAA = Pattern.compile("^#[0-9a-f]{8}", Pattern.CASE_INSENSITIVE); + private static final Pattern RGB = Pattern.compile("^#[0-9a-f]{3}", Pattern.CASE_INSENSITIVE); + private static final Pattern RGBA = Pattern.compile("^#[0-9a-f]{4}", Pattern.CASE_INSENSITIVE); + + public static boolean isValidHexColor(final String hex) { + if (hex.isEmpty()) { + return false; + } + + if (RRGGBB.matcher(hex).matches()) { + // #rrggbb + return true; + } + + if (RRGGBBAA.matcher(hex).matches()) { + // #rrggbbaa + return true; + } + + if (RGB.matcher(hex).matches()) { + // #rgb + return true; + } + + if (RGBA.matcher(hex).matches()) { + // #rgba + return true; + } + + return false; + } + + public static int strcmp(final String a, final String b) { + final int result = a.compareTo(b); + if (result < 0) { + return -1; + } else if (result > 0) { + return 1; + } + return 0; + } + + public static int strArrCmp(@Nullable final List a, @Nullable final List b) { + if (a == null && b == null) { + return 0; + } + if (a == null) { + return -1; + } + if (b == null) { + return 1; + } + final int len1 = a.size(); + final int len2 = b.size(); + if (len1 == len2) { + for (int i = 0; i < len1; i++) { + final int res = strcmp(a.get(i), b.get(i)); + if (res != 0) { + return res; + } + } + return 0; + } + return len1 - len2; + } + + private StringUtils() { + } +} From e5a9f5fcd7bdb940a7878c48f420a16a52a9d8cb Mon Sep 17 00:00:00 2001 From: sebthom Date: Tue, 17 May 2022 20:42:46 +0200 Subject: [PATCH 35/41] Update github URLs in javadoc --- .../eclipse/tm4e/core/grammar/IGrammar.java | 41 ++++++++++--------- .../tm4e/core/grammar/IStateStack.java | 7 ++-- .../org/eclipse/tm4e/core/grammar/IToken.java | 12 ++++-- .../core/grammar/ITokenizeLineResult.java | 6 +-- .../core/grammar/ITokenizeLineResult2.java | 6 +-- .../grammar/BalancedBracketSelectors.java | 7 +++- .../grammar/BasicScopeAttributes.java | 4 ++ .../grammar/BasicScopeAttributesProvider.java | 4 ++ .../tm4e/core/internal/grammar/Grammar.java | 2 +- .../tm4e/core/internal/grammar/Injection.java | 9 +++- .../core/internal/grammar/LineTokenizer.java | 8 ++-- .../core/internal/grammar/LineTokens.java | 7 +++- .../internal/grammar/LocalStackElement.java | 13 ++++-- .../core/internal/grammar/StateStack.java | 2 +- .../internal/grammar/TokenTypeMatcher.java | 7 +++- .../internal/grammar/TokenizeLineResult.java | 2 +- .../internal/grammar/TokenizeLineResult2.java | 2 +- .../dependencies/AbsoluteRuleReference.java | 7 +++- .../dependencies/IncludeReference.java | 7 +++- .../ScopeDependencyProcessor.java | 6 +-- .../grammar/dependencies/package-info.java | 5 +++ .../core/internal/grammar/package-info.java | 5 +++ .../grammar/reader/GrammarReader.java | 2 +- .../tokenattrs/EncodedTokenDataConsts.java | 4 +- .../tokenattrs/OptionalStandardTokenType.java | 6 ++- .../grammar/tokenattrs/StandardTokenType.java | 10 +++-- .../grammar/tokenattrs/package-info.java | 5 +++ .../tm4e/core/internal/matcher/Matcher.java | 2 +- .../core/internal/matcher/MatcherBuilder.java | 10 ++--- .../internal/matcher/MatcherWithPriority.java | 2 +- .../core/internal/matcher/NameMatcher.java | 10 ++--- .../tm4e/core/internal/model/DecodeMap.java | 2 +- .../model/ModelTokensChangedEventBuilder.java | 2 +- .../internal/model/TMTokenDecodeData.java | 2 +- .../core/internal/oniguruma/OnigRegExp.java | 4 +- .../core/internal/oniguruma/OnigString.java | 4 +- .../internal/registry/IGrammarRepository.java | 8 ++-- .../core/internal/registry/SyncRegistry.java | 2 +- .../tm4e/core/internal/rule/BeginEndRule.java | 6 +-- .../core/internal/rule/BeginWhileRule.java | 6 +-- .../tm4e/core/internal/rule/CaptureRule.java | 11 +++-- .../internal/rule/CompilePatternsResult.java | 6 +-- .../tm4e/core/internal/rule/CompiledRule.java | 6 +-- .../core/internal/rule/IGrammarRegistry.java | 12 +++--- .../internal/rule/IRuleFactoryHelper.java | 12 +++--- .../core/internal/rule/IRuleRegistry.java | 6 +-- .../core/internal/rule/IncludeOnlyRule.java | 12 +++--- .../tm4e/core/internal/rule/MatchRule.java | 10 ++--- .../tm4e/core/internal/rule/RegExpSource.java | 10 ++--- .../core/internal/rule/RegExpSourceList.java | 8 ++-- .../eclipse/tm4e/core/internal/rule/Rule.java | 8 ++-- .../tm4e/core/internal/rule/RuleFactory.java | 6 +-- .../tm4e/core/internal/rule/RuleId.java | 7 +++- .../tm4e/core/internal/rule/package-info.java | 2 +- .../tm4e/core/internal/theme/ColorMap.java | 2 +- .../tm4e/core/internal/theme/FontStyle.java | 4 +- .../core/internal/theme/IRawThemeSetting.java | 4 +- .../core/internal/theme/ParsedThemeRule.java | 12 +++--- .../core/internal/theme/ThemeTrieElement.java | 4 +- .../internal/theme/ThemeTrieElementRule.java | 13 +++--- .../theme/reader/SyncThemeReader.java | 2 +- .../internal/theme/reader/ThemeReader.java | 2 +- .../core/internal/types/IRawCaptures.java | 7 +++- .../tm4e/core/internal/types/IRawGrammar.java | 7 ++-- .../core/internal/types/IRawRepository.java | 7 +++- .../tm4e/core/internal/types/IRawRule.java | 7 +++- .../core/internal/types/package-info.java | 5 +++ .../tm4e/core/internal/utils/RegexSource.java | 31 ++++++++------ .../tm4e/core/internal/utils/StringUtils.java | 2 +- .../tm4e/core/model/ITokenizationSupport.java | 2 +- .../eclipse/tm4e/core/model/LineTokens.java | 2 +- .../core/model/ModelTokensChangedEvent.java | 2 +- .../org/eclipse/tm4e/core/model/Range.java | 2 +- .../org/eclipse/tm4e/core/model/TMState.java | 2 +- .../org/eclipse/tm4e/core/model/TMToken.java | 2 +- .../eclipse/tm4e/core/model/Tokenizer.java | 2 +- .../core/registry/IGrammarConfiguration.java | 2 +- .../tm4e/core/registry/IRegistryOptions.java | 6 +-- .../eclipse/tm4e/core/registry/Registry.java | 6 +-- 79 files changed, 305 insertions(+), 204 deletions(-) diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IGrammar.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IGrammar.java index 0e79366ab..ea8a03d95 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IGrammar.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IGrammar.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -23,9 +23,8 @@ /** * TextMate grammar API. * - * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/main.ts - * + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/main.ts */ public interface IGrammar { @@ -55,7 +54,8 @@ public interface IGrammar { * Tokenize `lineText`. * * @param lineText - * the line text to tokenize. + * the line text to tokenize. + * * @return the result of the tokenization. */ ITokenizeLineResult tokenizeLine(String lineText); @@ -64,9 +64,10 @@ public interface IGrammar { * Tokenize `lineText` using previous line state `prevState`. * * @param lineText - * the line text to tokenize. + * the line text to tokenize. * @param prevState - * previous line state. + * previous line state. + * * @return the result of the tokenization. */ ITokenizeLineResult tokenizeLine(String lineText, @Nullable IStateStack prevState); @@ -74,24 +75,26 @@ public interface IGrammar { /** * Tokenize `lineText` using previous line state `prevState`. * The result contains the tokens in binary format, resolved with the following information: - * - language - * - token type (regex, string, comment, other) - * - font style - * - foreground color - * - background color - * e.g. for getting the languageId: `(metadata & MetadataConsts.LANGUAGEID_MASK) >>> MetadataConsts.LANGUAGEID_OFFSET` + * - language + * - token type (regex, string, comment, other) + * - font style + * - foreground color + * - background color + * e.g. for getting the languageId: `(metadata & MetadataConsts.LANGUAGEID_MASK) >>> + * MetadataConsts.LANGUAGEID_OFFSET` */ ITokenizeLineResult2 tokenizeLine2(String lineText); /** * Tokenize `lineText` using previous line state `prevState`. * The result contains the tokens in binary format, resolved with the following information: - * - language - * - token type (regex, string, comment, other) - * - font style - * - foreground color - * - background color - * e.g. for getting the languageId: `(metadata & MetadataConsts.LANGUAGEID_MASK) >>> MetadataConsts.LANGUAGEID_OFFSET` + * - language + * - token type (regex, string, comment, other) + * - font style + * - foreground color + * - background color + * e.g. for getting the languageId: `(metadata & MetadataConsts.LANGUAGEID_MASK) >>> + * MetadataConsts.LANGUAGEID_OFFSET` */ ITokenizeLineResult2 tokenizeLine2(String lineText, @Nullable IStateStack prevState); diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IStateStack.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IStateStack.java index c77d268f6..c558b45cb 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IStateStack.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IStateStack.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -21,9 +21,8 @@ /** * Represents a "pushed" state on the stack (as a linked list element). * - * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/main.ts + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/main.ts */ public interface IStateStack { IStateStack INITIAL = StateStack.NULL; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IToken.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IToken.java index 1cfef609e..f70824181 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IToken.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IToken.java @@ -1,23 +1,27 @@ /** - * Copyright (c) 2015-2017 Angelo ZERR. + * Copyright (c) 2015-2017 Angelo ZERR. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * * Contributors: - * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license - * - Angelo Zerr - translation and adaptation to Java + * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license + * - Angelo Zerr - translation and adaptation to Java */ package org.eclipse.tm4e.core.grammar; import java.util.List; +/** + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/main.ts + */ public interface IToken { int getStartIndex(); diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult.java index ccc80165d..ae58819e4 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -19,8 +19,8 @@ /** * Result of the line tokenization API. * - * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/main.ts + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/main.ts */ public interface ITokenizeLineResult { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult2.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult2.java index 899a5648c..a1feb3f1a 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult2.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult2.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -19,8 +19,8 @@ /** * Result of the line tokenization2 API. * - * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/main.ts + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/main.ts */ public interface ITokenizeLineResult2 { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BalancedBracketSelectors.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BalancedBracketSelectors.java index de1c4e0fa..9cc37294f 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BalancedBracketSelectors.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BalancedBracketSelectors.java @@ -7,7 +7,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -22,6 +22,11 @@ import org.eclipse.tm4e.core.internal.matcher.Matcher; +/** + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/grammar.ts + */ public class BalancedBracketSelectors { private final Matcher>[] balancedBracketScopes; private final Matcher>[] unbalancedBracketScopes; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributes.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributes.java index e2c40a52e..34206eb88 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributes.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributes.java @@ -6,6 +6,10 @@ * * SPDX-License-Identifier: EPL-2.0 * + * Initial code from https://github.com/microsoft/vscode-textmate/ + * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. + * Initial license: MIT + * * Contributors: * Angelo Zerr - initial API and implementation */ diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java index f5b0847eb..55c489574 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java @@ -6,6 +6,10 @@ * * SPDX-License-Identifier: EPL-2.0 * + * Initial code from https://github.com/microsoft/vscode-textmate/ + * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. + * Initial license: MIT + * * Contributors: * Angelo Zerr - initial API and implementation */ diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java index 4376260cf..ded406cd3 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Injection.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Injection.java index d61539f95..8bad8607d 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Injection.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Injection.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -22,6 +22,11 @@ import org.eclipse.tm4e.core.internal.rule.RuleId; import org.eclipse.tm4e.core.internal.types.IRawGrammar; +/** + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/grammar.ts + */ final class Injection { final String debugSelector; @@ -31,7 +36,7 @@ final class Injection { final IRawGrammar grammar; Injection(final String debugSelector, final Matcher> matcher, final RuleId ruleId, - final IRawGrammar grammar, final int priority) { + final IRawGrammar grammar, final int priority) { this.debugSelector = debugSelector; this.matcher = matcher; this.ruleId = ruleId; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java index aff45a755..66764b283 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -39,8 +39,8 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/tokenizeString.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/tokenizeString.ts"> + * github.com/microsoft/vscode-textmate/blob/main/src/tokenizeString.ts */ final class LineTokenizer { @@ -162,7 +162,7 @@ private void scanNext() { // Grammar pushed & popped a rule without advancing LOGGER.log(INFO, "[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"); - // See https://github.com/Microsoft/vscode-textmate/issues/12 + // See https://github.com/microsoft/vscode-textmate/issues/12 // Let's assume this was a mistake by the grammar author and the // intent was to continue in this state stack = popped; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java index 6ecc08d43..5ea8d36de 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -33,6 +33,11 @@ import org.eclipse.tm4e.core.internal.grammar.tokenattrs.OptionalStandardTokenType; import org.eclipse.tm4e.core.internal.theme.FontStyle; +/** + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/grammar.ts + */ final class LineTokens { private static final Logger LOGGER = System.getLogger(LineTokens.class.getName()); diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LocalStackElement.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LocalStackElement.java index 81141fe66..3a7056db0 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LocalStackElement.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LocalStackElement.java @@ -1,21 +1,26 @@ /** - * Copyright (c) 2015-2017 Angelo ZERR. + * Copyright (c) 2015-2017 Angelo ZERR. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * * Contributors: - * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license - * - Angelo Zerr - translation and adaptation to Java + * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license + * - Angelo Zerr - translation and adaptation to Java */ package org.eclipse.tm4e.core.internal.grammar; +/** + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/tokenizeString.ts + */ final class LocalStackElement { final AttributedScopeStack scopes; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StateStack.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StateStack.java index 6b8a507dc..5762ffc44 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StateStack.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StateStack.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenTypeMatcher.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenTypeMatcher.java index e3554bd7d..9e088c2ad 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenTypeMatcher.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenTypeMatcher.java @@ -7,7 +7,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -21,6 +21,11 @@ import org.eclipse.tm4e.core.internal.matcher.Matcher; +/** + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/grammar.ts + */ final class TokenTypeMatcher { final Matcher> matcher; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineResult.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineResult.java index 3a3da371b..8567c3e58 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineResult.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineResult.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineResult2.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineResult2.java index 3ef93910d..715cb62d3 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineResult2.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/TokenizeLineResult2.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/AbsoluteRuleReference.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/AbsoluteRuleReference.java index ec2f575e2..7e3942350 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/AbsoluteRuleReference.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/AbsoluteRuleReference.java @@ -7,7 +7,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -17,6 +17,11 @@ */ package org.eclipse.tm4e.core.internal.grammar.dependencies; +/** + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/grammarDependencies.ts + */ public abstract class AbsoluteRuleReference { /** diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/IncludeReference.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/IncludeReference.java index de7401430..acfe29149 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/IncludeReference.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/IncludeReference.java @@ -7,7 +7,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -17,6 +17,11 @@ */ package org.eclipse.tm4e.core.internal.grammar.dependencies; +/** + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/grammarDependencies.ts + */ public class IncludeReference { public enum Kind { Base, diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/ScopeDependencyProcessor.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/ScopeDependencyProcessor.java index a9c9cabcd..248de4d37 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/ScopeDependencyProcessor.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/ScopeDependencyProcessor.java @@ -7,7 +7,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -37,8 +37,8 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/grammar.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/grammarDependencies.ts#L59"> + * github.com/microsoft/vscode-textmate/blob/main/src/grammarDependencies.ts */ public class ScopeDependencyProcessor { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/package-info.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/package-info.java index b1cbd33e1..e48003040 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/package-info.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/dependencies/package-info.java @@ -1,3 +1,8 @@ +/** + * Types in this package are modeled after + * github.com/microsoft/vscode-textmate/blob/main/src/grammarDependencies.ts + */ @NonNullByDefault package org.eclipse.tm4e.core.internal.grammar.dependencies; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/package-info.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/package-info.java index 1e721f14a..32e850be4 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/package-info.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/package-info.java @@ -1,3 +1,8 @@ +/** + * Types in this package are modeled after + * github.com/microsoft/vscode-textmate/blob/main/src/grammar.ts + */ @NonNullByDefault package org.eclipse.tm4e.core.internal.grammar; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/reader/GrammarReader.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/reader/GrammarReader.java index a9cf5c967..32c6546c2 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/reader/GrammarReader.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/reader/GrammarReader.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenDataConsts.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenDataConsts.java index a500a2bf5..86cf383c6 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenDataConsts.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenDataConsts.java @@ -33,8 +33,8 @@ * - b = background color (9 bits) * * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/metadata.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/encodedTokenAttributes.ts#L147"> + * github.com/microsoft/vscode-textmate/blob/main/src/encodedTokenAttributes.ts */ final class EncodedTokenDataConsts { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/OptionalStandardTokenType.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/OptionalStandardTokenType.java index a61e23526..f4f79bfce 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/OptionalStandardTokenType.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/OptionalStandardTokenType.java @@ -7,7 +7,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -18,7 +18,9 @@ package org.eclipse.tm4e.core.internal.grammar.tokenattrs; /** - * Standard TextMate token type. + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/encodedTokenAttributes.ts */ public final class OptionalStandardTokenType { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/StandardTokenType.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/StandardTokenType.java index 0c932e6a6..19fbce71c 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/StandardTokenType.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/StandardTokenType.java @@ -1,18 +1,22 @@ /** - * Copyright (c) 2015-2017 Angelo ZERR. + * Copyright (c) 2015-2017 Angelo ZERR. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * - * Contributors: - * Angelo Zerr - initial API and implementation + * Contributors: + * Angelo Zerr - initial API and implementation */ package org.eclipse.tm4e.core.internal.grammar.tokenattrs; /** * Standard TextMate token type. + * + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/encodedTokenAttributes.ts */ final class StandardTokenType { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/package-info.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/package-info.java index 270ab8f87..22b61a440 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/package-info.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/package-info.java @@ -1,3 +1,8 @@ +/** + * Types in this package are modeled after + * github.com/microsoft/vscode-textmate/blob/main/src/encodedTokenAttributes.ts + */ @NonNullByDefault package org.eclipse.tm4e.core.internal.grammar.tokenattrs; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/matcher/Matcher.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/matcher/Matcher.java index ac4a40ad8..7f41acbac 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/matcher/Matcher.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/matcher/Matcher.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/matcher/MatcherBuilder.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/matcher/MatcherBuilder.java index b450a3d5e..2feeb821f 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/matcher/MatcherBuilder.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/matcher/MatcherBuilder.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -28,8 +28,8 @@ /** * Matcher utilities. * - * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/matcher.ts + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/matcher.ts */ final class MatcherBuilder { @@ -150,7 +150,7 @@ private Matcher parseInnerExpression() { } /** - * https://github.com/microsoft/vscode-textmate/blob/master/src/matcher.ts#L89 + * https://github.com/microsoft/vscode-textmate/blob/main/src/matcher.ts#L89 */ private boolean isIdentifier(final String token) { if (token.isEmpty()) @@ -178,7 +178,7 @@ private boolean isIdentifier(final String token) { private static final class Tokenizer { /** - * https://github.com/microsoft/vscode-textmate/blob/master/src/matcher.ts#L94 + * https://github.com/microsoft/vscode-textmate/blob/main/src/matcher.ts#L94 */ static final Pattern TOKEN_PATTERN = Pattern.compile("([LR]:|[\\w\\.:][\\w\\.:\\-]*|[\\,\\|\\-\\(\\)])"); diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/matcher/MatcherWithPriority.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/matcher/MatcherWithPriority.java index 742865f40..b4904a50c 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/matcher/MatcherWithPriority.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/matcher/MatcherWithPriority.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/matcher/NameMatcher.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/matcher/NameMatcher.java index 5faca95c2..f9a408719 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/matcher/NameMatcher.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/matcher/NameMatcher.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -23,8 +23,8 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/grammar.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/grammar.ts#L72"> + * github.com/microsoft/vscode-textmate/blob/main/src/grammar.ts */ public interface NameMatcher { @@ -56,8 +56,8 @@ private boolean scopesAreMatching(@Nullable final String thisScopeName, final St } final int len = scopeName.length(); return thisScopeName.length() > len - && thisScopeName.substring(0, len).equals(scopeName) - && thisScopeName.charAt(len) == '.'; + && thisScopeName.substring(0, len).equals(scopeName) + && thisScopeName.charAt(len) == '.'; } }; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/model/DecodeMap.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/model/DecodeMap.java index 7859336c4..f4b7f6a7c 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/model/DecodeMap.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/model/DecodeMap.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/model/ModelTokensChangedEventBuilder.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/model/ModelTokensChangedEventBuilder.java index 1e934d3da..7b63d4837 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/model/ModelTokensChangedEventBuilder.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/model/ModelTokensChangedEventBuilder.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/model/TMTokenDecodeData.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/model/TMTokenDecodeData.java index 3525fbbeb..5b2f899f8 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/model/TMTokenDecodeData.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/model/TMTokenDecodeData.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigRegExp.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigRegExp.java index 77269b77f..432654a52 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigRegExp.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigRegExp.java @@ -34,8 +34,8 @@ /** * - * @see - * github.com/atom/node-oniguruma/blob/master/src/onig-reg-exp.cc * + * @see + * github.com/atom/node-oniguruma/blob/main/src/onig-reg-exp.cc * */ final class OnigRegExp { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigString.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigString.java index 4dc11bf2d..433ff46ee 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigString.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/oniguruma/OnigString.java @@ -27,8 +27,8 @@ /** * Oniguruma string. * - * @see - * github.com/atom/node-oniguruma/blob/master/src/onig-string.cc + * @see + * github.com/atom/node-oniguruma/blob/main/src/onig-string.cc * */ public abstract class OnigString { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/IGrammarRepository.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/IGrammarRepository.java index e185e12ac..d88d9d63f 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/IGrammarRepository.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/IGrammarRepository.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -24,9 +24,9 @@ /** * TextMate grammar repository API. * - * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/grammar.ts - * + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/grammar.ts */ public interface IGrammarRepository { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java index 05a72cba3..4255fdf85 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginEndRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginEndRule.java index 50e43d03c..d1c60b759 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginEndRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginEndRule.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -25,8 +25,8 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/rule.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/rule.ts#L209"> + * github.com/microsoft/vscode-textmate/blob/main/src/rule.ts */ public final class BeginEndRule extends Rule { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginWhileRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginWhileRule.java index bfdce7f35..96d8512d0 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginWhileRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/BeginWhileRule.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -25,8 +25,8 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/rule.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/rule.ts#L290"> + * github.com/microsoft/vscode-textmate/blob/main/src/rule.ts */ public final class BeginWhileRule extends Rule { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CaptureRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CaptureRule.java index 43e1ff05b..08cef24c4 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CaptureRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CaptureRule.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -20,15 +20,15 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/rule.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/rule.ts#L96"> + * github.com/microsoft/vscode-textmate/blob/main/src/rule.ts */ public final class CaptureRule extends Rule { public final RuleId retokenizeCapturedWithRuleId; CaptureRule(final RuleId id, @Nullable final String name, @Nullable final String contentName, - final RuleId retokenizeCapturedWithRuleId) { + final RuleId retokenizeCapturedWithRuleId) { super(id, name, contentName); this.retokenizeCapturedWithRuleId = retokenizeCapturedWithRuleId; } @@ -45,8 +45,7 @@ public CompiledRule compile(final IRuleRegistry grammar, @Nullable final String @Override public CompiledRule compileAG(final IRuleRegistry grammar, @Nullable final String endRegexSource, - final boolean allowA, - final boolean allowG) { + final boolean allowA, final boolean allowG) { throw new UnsupportedOperationException(); } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CompilePatternsResult.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CompilePatternsResult.java index 88e808eb9..8393773ec 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CompilePatternsResult.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CompilePatternsResult.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -18,8 +18,8 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/rule.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/rule.ts#L91"> + * github.com/microsoft/vscode-textmate/blob/main/src/rule.ts */ final class CompilePatternsResult { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CompiledRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CompiledRule.java index 1b89fe83a..b0e42a4fe 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CompiledRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/CompiledRule.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -22,8 +22,8 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/rule.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/rule.ts#L858"> + * github.com/microsoft/vscode-textmate/blob/main/src/rule.ts */ public final class CompiledRule { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IGrammarRegistry.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IGrammarRegistry.java index e061935e5..7a8a808fa 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IGrammarRegistry.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IGrammarRegistry.java @@ -1,18 +1,18 @@ /** - * Copyright (c) 2015-2017 Angelo ZERR. + * Copyright (c) 2015-2017 Angelo ZERR. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * * Contributors: - * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license - * - Angelo Zerr - translation and adaptation to Java + * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license + * - Angelo Zerr - translation and adaptation to Java */ package org.eclipse.tm4e.core.internal.rule; @@ -22,8 +22,8 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/rule.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/rule.ts#L17"> + * github.com/microsoft/vscode-textmate/blob/main/src/rule.ts */ interface IGrammarRegistry { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IRuleFactoryHelper.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IRuleFactoryHelper.java index f84c4195a..f8554c625 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IRuleFactoryHelper.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IRuleFactoryHelper.java @@ -1,25 +1,25 @@ /** - * Copyright (c) 2015-2017 Angelo ZERR. + * Copyright (c) 2015-2017 Angelo ZERR. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * * Contributors: - * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license - * - Angelo Zerr - translation and adaptation to Java + * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license + * - Angelo Zerr - translation and adaptation to Java */ package org.eclipse.tm4e.core.internal.rule; /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/rule.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/rule.ts#L40"> + * github.com/microsoft/vscode-textmate/blob/main/src/rule.ts */ public interface IRuleFactoryHelper extends IRuleRegistry, IGrammarRegistry { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IRuleRegistry.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IRuleRegistry.java index e0aa4c584..5e6fc9078 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IRuleRegistry.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IRuleRegistry.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -20,8 +20,8 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/rule.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/rule.ts#L31"> + * github.com/microsoft/vscode-textmate/blob/main/src/rule.ts */ public interface IRuleRegistry { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IncludeOnlyRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IncludeOnlyRule.java index 856188cc8..bab783bc6 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IncludeOnlyRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/IncludeOnlyRule.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -20,8 +20,8 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/rule.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/rule.ts#L166"> + * github.com/microsoft/vscode-textmate/blob/main/src/rule.ts */ final class IncludeOnlyRule extends Rule { @@ -32,7 +32,7 @@ final class IncludeOnlyRule extends Rule { private RegExpSourceList cachedCompiledPatterns; IncludeOnlyRule(final RuleId id, @Nullable final String name, @Nullable final String contentName, - final CompilePatternsResult patterns) { + final CompilePatternsResult patterns) { super(id, name, contentName); this.patterns = patterns.patterns; this.hasMissingPatterns = patterns.hasMissingPatterns; @@ -53,8 +53,8 @@ public CompiledRule compile(final IRuleRegistry grammar, @Nullable final String @Override public CompiledRule compileAG(final IRuleRegistry grammar, @Nullable final String endRegexSource, - final boolean allowA, - final boolean allowG) { + final boolean allowA, + final boolean allowG) { return getCachedCompiledPatterns(grammar).compileAG(allowA, allowG); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/MatchRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/MatchRule.java index 9ec77e7f6..86ef64119 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/MatchRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/MatchRule.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -22,8 +22,8 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/rule.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/rule.ts#L122"> + * github.com/microsoft/vscode-textmate/blob/main/src/rule.ts */ public final class MatchRule extends Rule { @@ -34,7 +34,7 @@ public final class MatchRule extends Rule { private RegExpSourceList cachedCompiledPatterns; MatchRule(final RuleId id, @Nullable final String name, final String match, - final List<@Nullable CaptureRule> captures) { + final List<@Nullable CaptureRule> captures) { super(id, name, null); this.match = new RegExpSource(match, this.id); this.captures = captures; @@ -52,7 +52,7 @@ public CompiledRule compile(final IRuleRegistry grammar, @Nullable final String @Override public CompiledRule compileAG(final IRuleRegistry grammar, @Nullable final String endRegexSource, - final boolean allowA, final boolean allowG) { + final boolean allowA, final boolean allowG) { return getCachedCompiledPatterns(grammar).compileAG(allowA, allowG); } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RegExpSource.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RegExpSource.java index b32ca4753..e27c02f6d 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RegExpSource.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RegExpSource.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -27,8 +27,8 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/rule.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/rule.ts#L582"> + * github.com/microsoft/vscode-textmate/blob/main/src/rule.ts */ final class RegExpSource { @@ -165,8 +165,8 @@ private String[][] buildAnchorCache() { } return new String[][] { - { A0_G0_result.toString(), A0_G1_result.toString() }, - { A1_G0_result.toString(), A1_G1_result.toString() } + { A0_G0_result.toString(), A0_G1_result.toString() }, + { A1_G0_result.toString(), A1_G1_result.toString() } }; } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RegExpSourceList.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RegExpSourceList.java index 03ab1b017..310ddb030 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RegExpSourceList.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RegExpSourceList.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -25,8 +25,8 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/rule.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/rule.ts#L744"> + * github.com/microsoft/vscode-textmate/blob/main/src/rule.ts */ final class RegExpSourceList { @@ -97,7 +97,7 @@ CompiledRule compileAG(final boolean allowA, final boolean allowG) { private CompiledRule resolveAnchors(final boolean allowA, final boolean allowG) { final List regexps = items.stream().map(e -> e.resolveAnchors(allowA, allowG)) - .collect(Collectors.toList()); + .collect(Collectors.toList()); return new CompiledRule(regexps, items.stream().map(e -> e.ruleId).toArray(RuleId[]::new)); } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/Rule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/Rule.java index acd60fb66..c895c29a3 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/Rule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/Rule.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -22,8 +22,8 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/rule.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/rule.ts#L43"> + * github.com/microsoft/vscode-textmate/blob/main/src/rule.ts */ public abstract class Rule { @@ -68,6 +68,6 @@ public String getContentName(final String lineText, final OnigCaptureIndex[] cap public abstract CompiledRule compile(IRuleRegistry grammar, @Nullable String endRegexSource); public abstract CompiledRule compileAG(IRuleRegistry grammar, @Nullable String endRegexSource, boolean allowA, - boolean allowG); + boolean allowG); } \ No newline at end of file diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java index 045ada115..d953a4df1 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleFactory.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -34,8 +34,8 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/rule.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/rule.ts#L381"> + * github.com/microsoft/vscode-textmate/blob/main/src/rule.ts */ public final class RuleFactory { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleId.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleId.java index 4f1fc8482..34162b874 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleId.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/RuleId.java @@ -7,7 +7,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -19,6 +19,11 @@ import org.eclipse.jdt.annotation.Nullable; +/** + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/rule.ts + */ public final class RuleId { public static final RuleId NO_RULE = new RuleId(0); diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/package-info.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/package-info.java index 95f07f89b..2c7b12115 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/package-info.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/rule/package-info.java @@ -1,6 +1,6 @@ /** * Types in this package are modeled after github.com/Microsoft/vscode-textmate/blob/main/src/rule.ts + * "https://github.com/microsoft/vscode-textmate/blob/main/src/rule.ts">github.com/microsoft/vscode-textmate/blob/main/src/rule.ts */ @NonNullByDefault package org.eclipse.tm4e.core.internal.rule; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ColorMap.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ColorMap.java index 873d54ebf..c34c7519d 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ColorMap.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ColorMap.java @@ -22,7 +22,7 @@ /** * @see - * https://github.com/Microsoft/vscode-textmate/blob/main/src/theme.ts + * github.com/microsoft/vscode-textmate/blob/main/src/theme.ts */ public final class ColorMap { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/FontStyle.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/FontStyle.java index 32e274f1f..7f561b735 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/FontStyle.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/FontStyle.java @@ -15,8 +15,8 @@ * Font style definitions. * * @see - * github.com/microsoft/vscode-textmate/blob/master/src/theme.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/theme.ts#L279"> + * https://github.com/microsoft/vscode-textmate/blob/main/src/theme.ts */ public final class FontStyle { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/IRawThemeSetting.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/IRawThemeSetting.java index 8e2089af0..67893d3bb 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/IRawThemeSetting.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/IRawThemeSetting.java @@ -16,8 +16,8 @@ /** * A single theme setting. * - * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/main.ts + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/main.ts */ public interface IRawThemeSetting { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ParsedThemeRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ParsedThemeRule.java index b7e5d5b80..7ab08d377 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ParsedThemeRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ParsedThemeRule.java @@ -18,8 +18,8 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/theme.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/theme.ts#L267"> + * github.com/microsoft/vscode-textmate/blob/main/src/theme.ts */ public class ParsedThemeRule { @@ -42,7 +42,7 @@ public class ParsedThemeRule { public final String background; public ParsedThemeRule(final String scope, @Nullable final List parentScopes, final int index, - final int fontStyle, @Nullable final String foreground, @Nullable final String background) { + final int fontStyle, @Nullable final String foreground, @Nullable final String background) { this.scope = scope; this.parentScopes = parentScopes; this.index = index; @@ -71,13 +71,13 @@ public boolean equals(@Nullable final Object obj) { return false; final ParsedThemeRule other = (ParsedThemeRule) obj; return Objects.equals(background, other.background) && fontStyle == other.fontStyle - && Objects.equals(foreground, other.foreground) && index == other.index - && Objects.equals(parentScopes, other.parentScopes) && Objects.equals(scope, other.scope); + && Objects.equals(foreground, other.foreground) && index == other.index + && Objects.equals(parentScopes, other.parentScopes) && Objects.equals(scope, other.scope); } @Override public String toString() { return "ParsedThemeRule [scope=" + scope + ", parentScopes=" + parentScopes + ", index=" + index - + ", fontStyle=" + fontStyle + ", foreground=" + foreground + ", background=" + background + "]"; + + ", fontStyle=" + fontStyle + ", foreground=" + foreground + ", background=" + background + "]"; } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeTrieElement.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeTrieElement.java index 68866e6b5..419f75c40 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeTrieElement.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeTrieElement.java @@ -23,8 +23,8 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/theme.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/theme.ts#L454"> + * github.com/microsoft/vscode-textmate/blob/main/src/theme.ts */ public final class ThemeTrieElement { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeTrieElementRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeTrieElementRule.java index 88b6c687a..a69bd2ae6 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeTrieElementRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeTrieElementRule.java @@ -19,8 +19,8 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/theme.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/theme.ts#L403"> + * github.com/microsoft/vscode-textmate/blob/main/src/theme.ts */ public class ThemeTrieElementRule { @@ -34,8 +34,9 @@ public class ThemeTrieElementRule { public int background; public ThemeTrieElementRule(final int scopeDepth, @Nullable final List parentScopes, final int fontStyle, - final int foreground, - final int background) { + final int foreground, + final int background) { + this.scopeDepth = scopeDepth; this.parentScopes = parentScopes; this.fontStyle = fontStyle; @@ -46,7 +47,7 @@ public ThemeTrieElementRule(final int scopeDepth, @Nullable final List p @Override public ThemeTrieElementRule clone() { return new ThemeTrieElementRule(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, - this.background); + this.background); } public static List cloneArr(final List arr) { @@ -101,6 +102,6 @@ public boolean equals(@Nullable final Object obj) { } final ThemeTrieElementRule other = (ThemeTrieElementRule) obj; return background == other.background && fontStyle == other.fontStyle && foreground == other.foreground && - Objects.equals(parentScopes, other.parentScopes) && scopeDepth == other.scopeDepth; + Objects.equals(parentScopes, other.parentScopes) && scopeDepth == other.scopeDepth; } } diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/SyncThemeReader.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/SyncThemeReader.java index 484b52f47..d5bedc041 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/SyncThemeReader.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/SyncThemeReader.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/ThemeReader.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/ThemeReader.java index 18fdbc8ac..dba43938c 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/ThemeReader.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/reader/ThemeReader.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawCaptures.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawCaptures.java index 25e0a6ec9..e51b2818a 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawCaptures.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawCaptures.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -16,6 +16,11 @@ */ package org.eclipse.tm4e.core.internal.types; +/** + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/rawGrammar.ts + */ public interface IRawCaptures { IRawRule getCapture(String captureId); diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawGrammar.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawGrammar.java index 6a884c9c5..75f079ac5 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawGrammar.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawGrammar.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -23,14 +23,15 @@ /** * @see - * github.com/Microsoft/vscode-textmate/blob/master/src/rawGrammar.ts + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/rawGrammar.ts"> + * github.com/microsoft/vscode-textmate/blob/main/src/rawGrammar.ts */ public interface IRawGrammar { IRawGrammar deepClone(); boolean isRepositorySet(); + IRawRepository getRepository(); String getScopeName(); diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawRepository.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawRepository.java index e567a5228..3f78008bf 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawRepository.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawRepository.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -20,6 +20,11 @@ import org.eclipse.tm4e.core.internal.grammar.RawRepository; import org.eclipse.tm4e.core.internal.parser.PropertySettable; +/** + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/rawGrammar.ts + */ public interface IRawRepository { static IRawRepository merge(@Nullable final IRawRepository... sources) { diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawRule.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawRule.java index 749b1209f..322916d9c 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawRule.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/IRawRule.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -21,6 +21,11 @@ import org.eclipse.jdt.annotation.Nullable; import org.eclipse.tm4e.core.internal.rule.RuleId; +/** + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/rawGrammar.ts + */ public interface IRawRule { @Nullable diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/package-info.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/package-info.java index 16526224a..ce40e075a 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/package-info.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/types/package-info.java @@ -1,3 +1,8 @@ +/** + * Types in this package are modeled after + * github.com/microsoft/vscode-textmate/blob/main/src/rawGrammar.ts + */ @NonNullByDefault package org.eclipse.tm4e.core.internal.types; diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/RegexSource.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/RegexSource.java index b85a2ef03..da1789fcd 100644 --- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/RegexSource.java +++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/RegexSource.java @@ -6,7 +6,7 @@ * * SPDX-License-Identifier: EPL-2.0 * - * Initial code from https://github.com/Microsoft/vscode-textmate/ + * Initial code from https://github.com/microsoft/vscode-textmate/ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved. * Initial license: MIT * @@ -22,6 +22,11 @@ import org.eclipse.jdt.annotation.Nullable; import org.eclipse.tm4e.core.internal.oniguruma.OnigCaptureIndex; +/** + * @see + * github.com/microsoft/vscode-textmate/blob/main/src/utils.ts + */ public final class RegexSource { /** @@ -31,13 +36,13 @@ private RegexSource() { } private static final Pattern CAPTURING_REGEX_SOURCE = Pattern - .compile("\\$(\\d+)|\\$\\{(\\d+):\\/(downcase|upcase)}"); + .compile("\\$(\\d+)|\\$\\{(\\d+):\\/(downcase|upcase)}"); /** * Escapes/prefixes RegEx meta characters with a backslash in the given string. * * It is a non-regex based faster alternative to the TypeScript + * "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/rule.ts#L159">TypeScript * implementation: * *
@@ -71,14 +76,14 @@ public static String escapeRegExpCharacters(final String value) {
 			case '(':
 			case ')':
 			case '#':
-			/* escaping white space chars is actually not necessary:
-			case ' ':
-			case '\t':
-			case '\n':
-			case '\f':
-			case '\r':
-			case 0x0B: // vertical tab \v
-			*/
+				/* escaping white space chars is actually not necessary:
+				case ' ':
+				case '\t':
+				case '\n':
+				case '\f':
+				case '\r':
+				case 0x0B: // vertical tab \v
+				*/
 				sb.append('\\');
 			}
 			sb.append(ch);
@@ -94,7 +99,7 @@ public static boolean hasCaptures(@Nullable final String regexSource) {
 	}
 
 	public static String replaceCaptures(final String regexSource, final String captureSource,
-			final OnigCaptureIndex[] captureIndices) {
+		final OnigCaptureIndex[] captureIndices) {
 		final Matcher m = CAPTURING_REGEX_SOURCE.matcher(regexSource);
 		final StringBuilder result = new StringBuilder();
 		while (m.find()) {
@@ -107,7 +112,7 @@ public static String replaceCaptures(final String regexSource, final String capt
 	}
 
 	private static String getReplacement(final String match, final String captureSource,
-			final OnigCaptureIndex[] captureIndices) {
+		final OnigCaptureIndex[] captureIndices) {
 		final int index;
 		final String command;
 		final int doublePointIndex = match.indexOf(':');
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/StringUtils.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/StringUtils.java
index 1b3ef2460..9045b196d 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/StringUtils.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/StringUtils.java
@@ -8,7 +8,7 @@
 /**
  * @see 
- *      https://github.com/Microsoft/vscode-textmate/blob/main/src/utils.ts
+ *      https://github.com/microsoft/vscode-textmate/blob/main/src/utils.ts
  */
 public final class StringUtils {
 
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/ITokenizationSupport.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/ITokenizationSupport.java
index 6c68e1973..4c3ebc90e 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/ITokenizationSupport.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/ITokenizationSupport.java
@@ -6,7 +6,7 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
- * Initial code from https://github.com/Microsoft/vscode-textmate/
+ * Initial code from https://github.com/microsoft/vscode-textmate/
  * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
  * Initial license: MIT
  *
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/LineTokens.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/LineTokens.java
index 18c1fd073..6efa580dd 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/LineTokens.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/LineTokens.java
@@ -6,7 +6,7 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
- * Initial code from https://github.com/Microsoft/vscode-textmate/
+ * Initial code from https://github.com/microsoft/vscode-textmate/
  * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
  * Initial license: MIT
  *
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/ModelTokensChangedEvent.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/ModelTokensChangedEvent.java
index 2b60c792c..def45a8d4 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/ModelTokensChangedEvent.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/ModelTokensChangedEvent.java
@@ -6,7 +6,7 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
- * Initial code from https://github.com/Microsoft/vscode-textmate/
+ * Initial code from https://github.com/microsoft/vscode-textmate/
  * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
  * Initial license: MIT
  *
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/Range.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/Range.java
index d0961c465..5852cb3ab 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/Range.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/Range.java
@@ -6,7 +6,7 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
- * Initial code from https://github.com/Microsoft/vscode-textmate/
+ * Initial code from https://github.com/microsoft/vscode-textmate/
  * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
  * Initial license: MIT
  *
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/TMState.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/TMState.java
index 51a24adfa..06e707cf3 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/TMState.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/TMState.java
@@ -6,7 +6,7 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
- * Initial code from https://github.com/Microsoft/vscode-textmate/
+ * Initial code from https://github.com/microsoft/vscode-textmate/
  * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
  * Initial license: MIT
  *
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/TMToken.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/TMToken.java
index 38e554063..1e1b5b898 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/TMToken.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/TMToken.java
@@ -6,7 +6,7 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
- * Initial code from https://github.com/Microsoft/vscode-textmate/
+ * Initial code from https://github.com/microsoft/vscode-textmate/
  * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
  * Initial license: MIT
  *
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/Tokenizer.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/Tokenizer.java
index debc99fb5..94f1c9a0a 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/Tokenizer.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/model/Tokenizer.java
@@ -6,7 +6,7 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
- * Initial code from https://github.com/Microsoft/vscode-textmate/
+ * Initial code from https://github.com/microsoft/vscode-textmate/
  * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
  * Initial license: MIT
  *
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IGrammarConfiguration.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IGrammarConfiguration.java
index d34120cc4..c8a0bb093 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IGrammarConfiguration.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IGrammarConfiguration.java
@@ -7,7 +7,7 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
- * Initial code from https://github.com/Microsoft/vscode-textmate/
+ * Initial code from https://github.com/microsoft/vscode-textmate/
  * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
  * Initial license: MIT
  *
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IRegistryOptions.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IRegistryOptions.java
index 3a243f4b5..b224f304b 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IRegistryOptions.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/IRegistryOptions.java
@@ -6,7 +6,7 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
- * Initial code from https://github.com/Microsoft/vscode-textmate/
+ * Initial code from https://github.com/microsoft/vscode-textmate/
  * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
  * Initial license: MIT
  *
@@ -25,8 +25,8 @@
 
 /**
  * @see 
- *      github.com/Microsoft/vscode-textmate/blob/master/src/main.ts
+ *      "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/main.ts#L39">
+ *      github.com/microsoft/vscode-textmate/blob/main/src/main.ts
  */
 public interface IRegistryOptions {
 
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/Registry.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/Registry.java
index a8764d9fb..4043e17ae 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/Registry.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/registry/Registry.java
@@ -6,7 +6,7 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
- * Initial code from https://github.com/Microsoft/vscode-textmate/
+ * Initial code from https://github.com/microsoft/vscode-textmate/
  * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
  * Initial license: MIT
  *
@@ -39,8 +39,8 @@
  * The registry that will hold all grammars.
  *
  * @see 
- *      github.com/Microsoft/vscode-textmate/blob/master/src/main.ts
+ *      "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/main.ts#L51">
+ *      github.com/microsoft/vscode-textmate/blob/main/src/main.ts
  *
  */
 public final class Registry {

From 8133ed224144109112ec56c2748e91ff36a6f56d Mon Sep 17 00:00:00 2001
From: sebthom 
Date: Tue, 17 May 2022 20:44:40 +0200
Subject: [PATCH 36/41] Remove Token class

---
 .../core/internal/grammar/LineTokens.java     | 43 +++++++++---
 .../tm4e/core/internal/grammar/Token.java     | 65 -------------------
 2 files changed, 34 insertions(+), 74 deletions(-)
 delete mode 100644 org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Token.java

diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java
index 5ea8d36de..0bc28e28d 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java
@@ -161,20 +161,45 @@ void produceFromScopes(final AttributedScopeStack scopesList, final int endIndex
 		final List scopes = scopesList.getScopeNames();
 
 		if (LOGGER.isLoggable(TRACE)) {
-			LOGGER.log(TRACE, "  token: |" +
-				castNonNull(this._lineText)
-					.substring(this._lastTokenEndIndex >= 0 ? this._lastTokenEndIndex : 0, endIndex)
-					.replace("\n", "\\n")
-				+ '|');
+			LOGGER.log(TRACE, "  token: |"
+				+ castNonNull(this._lineText).substring(this._lastTokenEndIndex, endIndex).replace("\n", "\\n") + '|');
 			for (final String scope : scopes) {
 				LOGGER.log(TRACE, "      * " + scope);
 			}
 		}
 
-		this._tokens.add(new Token(
-			this._lastTokenEndIndex >= 0 ? this._lastTokenEndIndex : 0,
-			endIndex,
-			scopes));
+		this._tokens.add(new IToken() {
+			private int startIndex = _lastTokenEndIndex;
+
+			@Override
+			public int getStartIndex() {
+				return startIndex;
+			}
+
+			@Override
+			public void setStartIndex(final int startIndex) {
+				this.startIndex = startIndex;
+			}
+
+			@Override
+			public int getEndIndex() {
+				return endIndex;
+			}
+
+			@Override
+			public List getScopes() {
+				return scopes;
+			}
+
+			@Override
+			public String toString() {
+				return "{" +
+					"startIndex: " + startIndex +
+					", endIndex: " + endIndex +
+					", scopes: " + scopes +
+					"}";
+			}
+		});
 
 		this._lastTokenEndIndex = endIndex;
 	}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Token.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Token.java
deleted file mode 100644
index 59a310ca6..000000000
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Token.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Copyright (c) 2015-2017 Angelo ZERR.
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Initial code from https://github.com/Microsoft/vscode-textmate/
- * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
- * Initial license: MIT
- *
- * Contributors:
- * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
- * - Angelo Zerr  - translation and adaptation to Java
- */
-package org.eclipse.tm4e.core.internal.grammar;
-
-import java.util.List;
-
-import org.eclipse.tm4e.core.grammar.IToken;
-
-final class Token implements IToken {
-
-	private int startIndex;
-
-	private final int endIndex;
-
-	private final List scopes;
-
-	Token(final int startIndex, final int endIndex, final List scopes) {
-		this.startIndex = startIndex;
-		this.endIndex = endIndex;
-		this.scopes = scopes;
-	}
-
-	@Override
-	public int getStartIndex() {
-		return startIndex;
-	}
-
-	@Override
-	public void setStartIndex(final int startIndex) {
-		this.startIndex = startIndex;
-	}
-
-	@Override
-	public int getEndIndex() {
-		return endIndex;
-	}
-
-	@Override
-	public List getScopes() {
-		return scopes;
-	}
-
-	@Override
-	public String toString() {
-		return "{" +
-				"startIndex: " + startIndex +
-				", endIndex: " + endIndex +
-				", scopes: " + scopes +
-				"}";
-	}
-}

From 931b43c1b909d9e5029c81050d7e3bc163eb0fb5 Mon Sep 17 00:00:00 2001
From: sebthom 
Date: Tue, 17 May 2022 20:50:32 +0200
Subject: [PATCH 37/41] Reorder constructors

---
 .../tokenattrs/EncodedTokenAttributes.java    | 27 +++++++++----------
 .../tokenattrs/EncodedTokenDataConsts.java    | 13 ++++-----
 .../tokenattrs/OptionalStandardTokenType.java | 14 +++++-----
 .../grammar/tokenattrs/StandardTokenType.java | 10 +++----
 .../tm4e/core/internal/utils/RegexSource.java | 12 ++++-----
 5 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributes.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributes.java
index 1b5a2b360..5dd7af737 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributes.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributes.java
@@ -12,22 +12,19 @@
 package org.eclipse.tm4e.core.internal.grammar.tokenattrs;
 
 import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tm4e.core.internal.grammar.StateStack;
 import org.eclipse.tm4e.core.internal.theme.FontStyle;
 
 /**
- * Metadata for {@link StateStack}.
- *
  * @see 
- *      github.com/Microsoft/vscode-textmate/blob/master/src/metadata.ts
+ *      "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/encodedTokenAttributes.ts">
+ *      github.com/microsoft/vscode-textmate/blob/main/src/encodedTokenAttributes.ts
  */
 public final class EncodedTokenAttributes {
 
-	/**
-	 * Content should be referenced statically
-	 */
-	private EncodedTokenAttributes() {
+	public static String toBinaryStr(final int encodedTokenAttributes) {
+		return new StringBuilder(Integer.toBinaryString(encodedTokenAttributes))
+			.insert(0, "0".repeat(Integer.numberOfLeadingZeros(encodedTokenAttributes)))
+			.toString();
 	}
 
 	public static String toString(final int encodedTokenAttributes) {
@@ -48,12 +45,6 @@ public static String toString(final int encodedTokenAttributes) {
 			"}";
 	}
 
-	public static String toBinaryStr(final int metadata) {
-		return new StringBuilder(Integer.toBinaryString(metadata))
-			.insert(0, "0".repeat(Integer.numberOfLeadingZeros(metadata)))
-			.toString();
-	}
-
 	public static int getLanguageId(final int metadata) {
 		return (metadata & EncodedTokenDataConsts.LANGUAGEID_MASK) >>> EncodedTokenDataConsts.LANGUAGEID_OFFSET;
 	}
@@ -100,4 +91,10 @@ public static int set(final int metadata, final int languageId, final /*Optional
 			| _foreground << EncodedTokenDataConsts.FOREGROUND_OFFSET
 			| _background << EncodedTokenDataConsts.BACKGROUND_OFFSET) >>> 0;
 	}
+
+	/**
+	 * Content should be referenced statically
+	 */
+	private EncodedTokenAttributes() {
+	}
 }
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenDataConsts.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenDataConsts.java
index 86cf383c6..819a253ca 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenDataConsts.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenDataConsts.java
@@ -38,12 +38,6 @@
  */
 final class EncodedTokenDataConsts {
 
-	/**
-	 * content should be accessed statically
-	 */
-	private EncodedTokenDataConsts() {
-	}
-
 	static final int LANGUAGEID_MASK = 0b00000000000000000000000011111111;
 	static final int TOKEN_TYPE_MASK = 0b00000000000000000000001100000000;
 	static final int BALANCED_BRACKETS_MASK = 0b00000000000000000000010000000000;
@@ -57,4 +51,11 @@ private EncodedTokenDataConsts() {
 	static final int FONT_STYLE_OFFSET = 11;
 	static final int FOREGROUND_OFFSET = 15;
 	static final int BACKGROUND_OFFSET = 24;
+
+	/**
+	 * content should be accessed statically
+	 */
+	private EncodedTokenDataConsts() {
+	}
+
 }
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/OptionalStandardTokenType.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/OptionalStandardTokenType.java
index f4f79bfce..b1ad753f3 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/OptionalStandardTokenType.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/OptionalStandardTokenType.java
@@ -24,12 +24,7 @@
  */
 public final class OptionalStandardTokenType {
 
-	/**
-	 * Content should be accessed statically
-	 */
-	private OptionalStandardTokenType() {
-	}
-
+	// Must have the same values as `StandardTokenType`!
 	public static final int Other = StandardTokenType.Other;
 	public static final int Comment = StandardTokenType.Comment;
 	public static final int String = StandardTokenType.String;
@@ -39,4 +34,11 @@ private OptionalStandardTokenType() {
 	 * Indicates that no token type is set.
 	 */
 	public static final int NotSet = 8;
+
+	/**
+	 * Content should be accessed statically
+	 */
+	private OptionalStandardTokenType() {
+	}
+
 }
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/StandardTokenType.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/StandardTokenType.java
index 19fbce71c..6aead7a1c 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/StandardTokenType.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/StandardTokenType.java
@@ -20,14 +20,14 @@
  */
 final class StandardTokenType {
 
+	static final int Other = 0;
+	static final int Comment = 1;
+	static final int String = 2;
+	static final int RegEx = 3;
+
 	/**
 	 * Content should be accessed statically
 	 */
 	private StandardTokenType() {
 	}
-
-	static final int Other = 0;
-	static final int Comment = 1;
-	static final int String = 2;
-	static final int RegEx = 3;
 }
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/RegexSource.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/RegexSource.java
index da1789fcd..fc88ce180 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/RegexSource.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/RegexSource.java
@@ -29,12 +29,6 @@
  */
 public final class RegexSource {
 
-	/**
-	 * Helper class, access members statically
-	 */
-	private RegexSource() {
-	}
-
 	private static final Pattern CAPTURING_REGEX_SOURCE = Pattern
 		.compile("\\$(\\d+)|\\$\\{(\\d+):\\/(downcase|upcase)}");
 
@@ -140,4 +134,10 @@ private static String getReplacement(final String match, final String captureSou
 		}
 		return match;
 	}
+
+	/**
+	 * Helper class, access members statically
+	 */
+	private RegexSource() {
+	}
 }

From 04c2f71f02353ae6b54e42be65af75e7619f4a43 Mon Sep 17 00:00:00 2001
From: sebthom 
Date: Tue, 17 May 2022 20:50:55 +0200
Subject: [PATCH 38/41] Remove unused IStateStack.INITIAL field

---
 .../main/java/org/eclipse/tm4e/core/grammar/IStateStack.java  | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IStateStack.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IStateStack.java
index c558b45cb..5d9f1ec48 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IStateStack.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IStateStack.java
@@ -16,8 +16,6 @@
  */
 package org.eclipse.tm4e.core.grammar;
 
-import org.eclipse.tm4e.core.internal.grammar.StateStack;
-
 /**
  * Represents a "pushed" state on the stack (as a linked list element).
  *
@@ -25,7 +23,5 @@
  *      github.com/microsoft/vscode-textmate/blob/main/src/main.ts
  */
 public interface IStateStack {
-	IStateStack INITIAL = StateStack.NULL;
-
 	int getDepth();
 }

From d3e4a727fe7d2ff9fff6903840546ebae2169c9b Mon Sep 17 00:00:00 2001
From: sebthom 
Date: Tue, 17 May 2022 20:59:29 +0200
Subject: [PATCH 39/41] Add ScopeStack, StyleAttributes and refactor according
 upstream project

---
 .../internal/theme/AbstractThemeTest.java     |   3 +-
 .../internal/theme/ThemeMatchingTest.java     | 246 +++++++-----------
 .../core/internal/theme/ThemeParsingTest.java |  14 +-
 .../internal/theme/ThemeResolvingTest.java    | 220 +++++++---------
 .../grammar/AttributedScopeStack.java         | 154 +++++------
 .../grammar/BasicScopeAttributes.java         |  20 +-
 .../grammar/BasicScopeAttributesProvider.java | 134 ++++------
 .../tm4e/core/internal/grammar/Grammar.java   |  38 ++-
 .../core/internal/grammar/ScopeStack.java     |  83 ++++++
 .../core/internal/grammar/StateStack.java     |   8 +-
 .../internal/registry/IThemeProvider.java     |  29 +++
 .../core/internal/registry/SyncRegistry.java  |  16 +-
 .../tm4e/core/internal/theme/ColorMap.java    |  12 +-
 .../core/internal/theme/IThemeProvider.java   |  22 --
 .../core/internal/theme/StyleAttributes.java  |  64 +++++
 .../tm4e/core/internal/theme/Theme.java       |  70 +++--
 .../core/internal/utils/MoreCollections.java  |  10 +
 17 files changed, 609 insertions(+), 534 deletions(-)
 create mode 100644 org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/ScopeStack.java
 create mode 100644 org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/IThemeProvider.java
 delete mode 100644 org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/IThemeProvider.java
 create mode 100644 org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/StyleAttributes.java

diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/AbstractThemeTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/AbstractThemeTest.java
index fd1e91b52..6b9570ddd 100644
--- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/AbstractThemeTest.java
+++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/AbstractThemeTest.java
@@ -25,8 +25,9 @@
 import java.util.Map;
 
 import org.eclipse.tm4e.core.internal.theme.reader.ThemeReader;
+import org.junit.jupiter.api.Assertions;
 
-public abstract class AbstractThemeTest {
+public abstract class AbstractThemeTest extends Assertions {
 
 	protected static final int _NOT_SET = 0;
 
diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java
index 53f749aa4..7d22ac24f 100644
--- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java
+++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java
@@ -11,24 +11,26 @@
  */
 package org.eclipse.tm4e.core.internal.theme;
 
-import static org.eclipse.tm4e.core.internal.theme.FontStyle.*;
-import static org.junit.jupiter.api.Assertions.*;
+import java.util.Map;
 
-import org.eclipse.tm4e.core.internal.grammar.AttributedScopeStack;
-import org.eclipse.tm4e.core.internal.grammar.BasicScopeAttributes;
-import org.eclipse.tm4e.core.internal.grammar.tokenattrs.EncodedTokenAttributes;
+import org.eclipse.tm4e.core.internal.grammar.ScopeStack;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.MethodOrderer;
+import org.junit.jupiter.api.Order;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestMethodOrder;
 
 /**
- * @see 
+ * @see 
  *      github.com/Microsoft/vscode-textmate/blob/master/src/tests/themes.test.ts
  */
+@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
 class ThemeMatchingTest extends AbstractThemeTest {
 
-	/**
-	 * test: Theme matching gives higher priority to deeper matches
-	 */
 	@Test
+	@Order(1)
+	@DisplayName("Theme matching gives higher priority to deeper matches")
 	void testGivesHigherPriorityToDeeperMatches() throws Exception {
 		final Theme theme = createTheme("""
 			{"settings": [
@@ -37,21 +39,13 @@ void testGivesHigherPriorityToDeeperMatches() throws Exception {
 				{ "scope": "meta.tag punctuation.definition.string", "settings": { "foreground": "#400000" } }
 			]}""");
 
-		final ColorMap colorMap = new ColorMap();
-		final int _A = colorMap.getId("#100000");
-		final int _B = colorMap.getId("#200000");
-		final int _C = colorMap.getId("#400000");
-		final int _D = colorMap.getId("#300000");
-
-		assertMatch(theme, "punctuation.definition.string.begin.html",
-			new ThemeTrieElementRule(5, null, NotSet, _D, _NOT_SET),
-			new ThemeTrieElementRule(3, list("meta.tag"), NotSet, _C, _NOT_SET));
+		final var actual = theme.match(ScopeStack.from("punctuation.definition.string.begin.html"));
+		assertEquals(theme.getColorMap().get(actual.foregroundId), "#300000");
 	}
 
-	/**
-	 * test: Theme matching gives higher priority to parent matches 1
-	 */
 	@Test
+	@Order(2)
+	@DisplayName("Theme matching gives higher priority to parent matches 1")
 	void testGivesHigherPriorityToParentMatches1() throws Exception {
 		final Theme theme = createTheme("""
 			{"settings": [
@@ -61,23 +55,16 @@ void testGivesHigherPriorityToParentMatches1() throws Exception {
 				{ "scope": "a", "settings": { "foreground": "#500000" } }
 			]}""");
 
-		final ColorMap colorMap = new ColorMap();
-		final int _A = colorMap.getId("#100000");
-		final int _B = colorMap.getId("#200000");
-		final int _C = colorMap.getId("#500000");
-		final int _D = colorMap.getId("#300000");
-		final int _E = colorMap.getId("#400000");
+		final var map = theme.getColorMap();
 
-		assertMatch(theme, "a.b",
-			new ThemeTrieElementRule(2, list("d"), NotSet, _E, _NOT_SET),
-			new ThemeTrieElementRule(1, list("c"), NotSet, _D, _NOT_SET),
-			new ThemeTrieElementRule(1, null, NotSet, _C, _NOT_SET));
+		assertEquals(
+			map.get(theme.match(ScopeStack.from("d", "a.b")).foregroundId),
+			"#400000");
 	}
 
-	/**
-	 * test: Theme matching gives higher priority to parent matches 2
-	 */
 	@Test
+	@Order(3)
+	@DisplayName("Theme matching gives higher priority to parent matches 2")
 	void testGivesHigherPriorityToParentMatches2() throws Exception {
 		final Theme theme = createTheme("""
 			{"settings": [
@@ -87,18 +74,35 @@ void testGivesHigherPriorityToParentMatches2() throws Exception {
 				{ "scope": "entity", "settings": { "foreground": "#500000" } }
 			]}""");
 
-		final var root = new AttributedScopeStack(null, "text.html.cshtml", 0);
-		final var parent = new AttributedScopeStack(root, "meta.tag.structure.any.html", 0);
-		final int r = AttributedScopeStack.mergeAttributes(0, parent,
-			new BasicScopeAttributes(0, 0, theme.match("entity.name.tag.structure.any.html")));
-		final String color = theme.getColor(EncodedTokenAttributes.getForeground(r));
-		assertEquals("#300000", color);
+		final var result = theme.match(
+			ScopeStack.from(
+				"text.html.cshtml",
+				"meta.tag.structure.any.html",
+				"entity.name.tag.structure.any.html"));
+
+		final var colorMap = theme.getColorMap();
+		assertEquals(colorMap.get(result.foregroundId), "#300000");
+	}
+
+	private final Map match(Theme theme, String... path) {
+		final var map = theme.getColorMap();
+		final var result = theme.match(ScopeStack.from(path));
+		if (result == null) {
+			return null;
+		}
+		final var obj = map("fontStyle", FontStyle.fontStyleToString(result.fontStyle));
+		if (result.foregroundId != 0) {
+			obj.put("foreground", map.get(result.foregroundId));
+		}
+		if (result.backgroundId != 0) {
+			obj.put("background", map.get(result.backgroundId));
+		}
+		return obj;
 	}
 
-	/**
-	 * test: Theme matching can match
-	 */
 	@Test
+	@Order(4)
+	@DisplayName("Theme matching can match")
 	void testCanMatch() throws Exception {
 		final Theme theme = createTheme("""
 			{"settings": [
@@ -114,75 +118,50 @@ void testCanMatch() throws Exception {
 				{ "scope": "storage.object.bar", "settings": { "fontStyle": "", "foreground": "#600000" } }
 			]}""");
 
-		final ColorMap colorMap = new ColorMap();
-		final int _A = colorMap.getId("#F8F8F2");
-		final int _B = colorMap.getId("#272822");
-		final int _C = colorMap.getId("#200000");
-		final int _D = colorMap.getId("#300000");
-		final int _E = colorMap.getId("#400000");
-		final int _F = colorMap.getId("#500000");
-		final int _G = colorMap.getId("#100000");
-		final int _H = colorMap.getId("#600000");
-
-		// matches defaults
-		assertNoMatch(theme, "");
-		assertNoMatch(theme, "bazz");
-		assertNoMatch(theme, "asdfg");
-
-		// matches source
-		assertSimpleMatch(theme, "source", 1, NotSet, _NOT_SET, _G);
-		assertSimpleMatch(theme, "source.ts", 1, NotSet, _NOT_SET, _G);
-		assertSimpleMatch(theme, "source.tss", 1, NotSet, _NOT_SET, _G);
-
-		// matches something
-		assertSimpleMatch(theme, "something", 1, NotSet, _NOT_SET, _G);
-		assertSimpleMatch(theme, "something.ts", 1, NotSet, _NOT_SET, _G);
-		assertSimpleMatch(theme, "something.tss", 1, NotSet, _NOT_SET, _G);
-
-		// matches baz
-		assertSimpleMatch(theme, "baz", 1, NotSet, _NOT_SET, _C);
-		assertSimpleMatch(theme, "baz.ts", 1, NotSet, _NOT_SET, _C);
-		assertSimpleMatch(theme, "baz.tss", 1, NotSet, _NOT_SET, _C);
-
-		// matches constant
-		assertSimpleMatch(theme, "constant", 1, Italic, _D, _NOT_SET);
-		assertSimpleMatch(theme, "constant.string", 1, Italic, _D, _NOT_SET);
-		assertSimpleMatch(theme, "constant.hex", 1, Italic, _D, _NOT_SET);
-
-		// matches constant.numeric
-		assertSimpleMatch(theme, "constant.numeric", 2, Italic, _E, _NOT_SET);
-		assertSimpleMatch(theme, "constant.numeric.baz", 2, Italic, _E, _NOT_SET);
-
-		// matches constant.numeric.hex
-		assertSimpleMatch(theme, "constant.numeric.hex", 3, Bold, _E, _NOT_SET);
-		assertSimpleMatch(theme, "constant.numeric.hex.baz", 3, Bold, _E, _NOT_SET);
-
-		// matches constant.numeric.oct
-		assertSimpleMatch(theme, "constant.numeric.oct", 3, Bold | Italic | Underline, _E, _NOT_SET);
-		assertSimpleMatch(theme, "constant.numeric.oct.baz", 3, Bold | Italic | Underline, _E, _NOT_SET);
-
-		// matches constant.numeric.dec
-		assertSimpleMatch(theme, "constant.numeric.dec", 3, None, _F, _NOT_SET);
-		assertSimpleMatch(theme, "constant.numeric.dec.baz", 3, None, _F, _NOT_SET);
-
-		// matches storage.object.bar
-		assertSimpleMatch(theme, "storage.object.bar", 3, None, _H, _NOT_SET);
-		assertSimpleMatch(theme, "storage.object.bar.baz", 3, None, _H, _NOT_SET);
-
-		// does not match storage.object.bar
-		assertSimpleMatch(theme, "storage.object.bart", 0, NotSet, _NOT_SET, _NOT_SET);
-		assertSimpleMatch(theme, "storage.object", 0, NotSet, _NOT_SET, _NOT_SET);
-		assertSimpleMatch(theme, "storage", 0, NotSet, _NOT_SET, _NOT_SET);
-
-		assertMatch(theme, "bar",
-			new ThemeTrieElementRule(1, list("selector", "source.css"), Bold, _NOT_SET, _C),
-			new ThemeTrieElementRule(1, null, NotSet, _NOT_SET, _C));
+		// simpleMatch1..25
+		assertEquals(match(theme, "source"), map("background", "#100000", "fontStyle", "not set"));
+		assertEquals(match(theme, "source"), map("background", "#100000", "fontStyle", "not set"));
+		assertEquals(match(theme, "source.ts"), map("background", "#100000", "fontStyle", "not set"));
+		assertEquals(match(theme, "source.tss"), map("background", "#100000", "fontStyle", "not set"));
+		assertEquals(match(theme, "something"), map("background", "#100000", "fontStyle", "not set"));
+		assertEquals(match(theme, "something.ts"), map("background", "#100000", "fontStyle", "not set"));
+		assertEquals(match(theme, "something.tss"), map("background", "#100000", "fontStyle", "not set"));
+		assertEquals(match(theme, "baz"), map("background", "#200000", "fontStyle", "not set"));
+		assertEquals(match(theme, "baz.ts"), map("background", "#200000", "fontStyle", "not set"));
+		assertEquals(match(theme, "baz.tss"), map("background", "#200000", "fontStyle", "not set"));
+		assertEquals(match(theme, "constant"), map("foreground", "#300000", "fontStyle", "italic"));
+		assertEquals(match(theme, "constant.string"), map("foreground", "#300000", "fontStyle", "italic"));
+		assertEquals(match(theme, "constant.hex"), map("foreground", "#300000", "fontStyle", "italic"));
+		assertEquals(match(theme, "constant.numeric"), map("foreground", "#400000", "fontStyle", "italic"));
+		assertEquals(match(theme, "constant.numeric.baz"), map("foreground", "#400000", "fontStyle", "italic"));
+		assertEquals(match(theme, "constant.numeric.hex"), map("foreground", "#400000", "fontStyle", "bold"));
+		assertEquals(match(theme, "constant.numeric.hex.baz"), map("foreground", "#400000", "fontStyle", "bold"));
+		assertEquals(match(theme, "constant.numeric.oct"),
+			map("foreground", "#400000", "fontStyle", "italic bold underline"));
+		assertEquals(match(theme, "constant.numeric.oct.baz"),
+			map("foreground", "#400000", "fontStyle", "italic bold underline"));
+		assertEquals(match(theme, "constant.numeric.dec"), map("foreground", "#500000", "fontStyle", "none"));
+		assertEquals(match(theme, "constant.numeric.dec.baz"), map("foreground", "#500000", "fontStyle", "none"));
+		assertEquals(match(theme, "storage.object.bar"), map("foreground", "#600000", "fontStyle", "none"));
+		assertEquals(match(theme, "storage.object.bar.baz"), map("foreground", "#600000", "fontStyle", "none"));
+		assertEquals(match(theme, "storage.object.bart"), map("fontStyle", "not set"));
+		assertEquals(match(theme, "storage.object"), map("fontStyle", "not set"));
+		assertEquals(match(theme, "storage"), map("fontStyle", "not set"));
+
+		// defaultMatch1..3
+		assertEquals(match(theme, ""), map("fontStyle", "not set"));
+		assertEquals(match(theme, "bazz"), map("fontStyle", "not set"));
+		assertEquals(match(theme, "asdfg"), map("fontStyle", "not set"));
+
+		// multiMatch1..2
+		assertEquals(match(theme, "bar"), map("background", "#200000", "fontStyle", "not set"));
+		assertEquals(match(theme, "source.css", "selector", "bar"),
+			map("background", "#200000", "fontStyle", "bold"));
 	}
 
-	/**
-	 * test: theme matching Microsoft/vscode#23460
-	 */
 	@Test
+	@Order(5)
+	@DisplayName("Theme matching Microsoft/vscode#23460")
 	void testMicrosoft_vscode_23460() throws Exception {
 		final Theme theme = createTheme("""
 			{"settings": [
@@ -210,47 +189,12 @@ void testMicrosoft_vscode_23460() throws Exception {
 				}
 			]}""");
 
-		final ColorMap colorMap = new ColorMap();
-		final int _NOT_SET = 0;
-		final int _A = colorMap.getId("#aec2e0");
-		final int _B = colorMap.getId("#14191f");
-		final int _C = colorMap.getId("#FF410D");
-		final int _D = colorMap.getId("#ffffff");
-
-		// string.quoted.double.json
-		// meta.structure.dictionary.value.json
-		// meta.structure.dictionary.json
-		// source.json
-		assertMatch(theme, "string.quoted.double.json",
-			new ThemeTrieElementRule(4, list("meta.structure.dictionary.value.json"), NotSet, _C, _NOT_SET),
-			new ThemeTrieElementRule(4, list("meta.structure.dictionary.json"), NotSet, _D, _NOT_SET),
-			new ThemeTrieElementRule(0, null, NotSet, _NOT_SET, _NOT_SET));
-
-		final var parent3 = new AttributedScopeStack(null, "source.json", 0);
-		final var parent2 = new AttributedScopeStack(parent3, "meta.structure.dictionary.json", 0);
-		final var parent1 = new AttributedScopeStack(parent2, "meta.structure.dictionary.value.json", 0);
-
-		final int r = AttributedScopeStack.mergeAttributes(
-			0,
-			parent1,
-			new BasicScopeAttributes(0, 0, theme.match("string.quoted.double.json")));
-		final String color = theme.getColor(EncodedTokenAttributes.getForeground(r));
-		assertEquals("#FF410D", color);
-	}
-
-	private void assertMatch(final Theme theme, final String scopeName, final ThemeTrieElementRule... expected) {
-		final var actual = theme.match(scopeName);
-		assertArrayEquals(expected, actual.toArray(), "when matching <<" + scopeName + ">>");
-	}
-
-	private void assertSimpleMatch(final Theme theme, final String scopeName, final int scopeDepth, final int fontStyle,
-		final int foreground, final int background) {
-		assertMatch(theme, scopeName,
-			new ThemeTrieElementRule(scopeDepth, null, fontStyle, foreground, background));
-	}
-
-	private void assertNoMatch(final Theme theme, final String scopeName) {
-		assertMatch(theme, scopeName,
-			new ThemeTrieElementRule(0, null, NotSet, 0, 0 /*_NOT_SET, _NOT_SET*/));
+		final var path = ScopeStack.from(
+			"source.json",
+			"meta.structure.dictionary.json",
+			"meta.structure.dictionary.value.json",
+			"string.quoted.double.json");
+		final var result = theme.match(path);
+		assertEquals(theme.getColorMap().get(result.foregroundId), "#FF410D");
 	}
 }
diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeParsingTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeParsingTest.java
index 8b11627c1..c3bc2125d 100644
--- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeParsingTest.java
+++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeParsingTest.java
@@ -12,20 +12,24 @@
 package org.eclipse.tm4e.core.internal.theme;
 
 import static org.eclipse.tm4e.core.internal.theme.FontStyle.*;
-import static org.junit.jupiter.api.Assertions.*;
 
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.MethodOrderer;
+import org.junit.jupiter.api.Order;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestMethodOrder;
 
 /**
- * @see 
+ * @see 
  *      github.com/Microsoft/vscode-textmate/blob/master/src/tests/themes.test.ts
  */
+@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
 public class ThemeParsingTest extends AbstractThemeTest {
 
-	/**
-	 * test: Theme parsing can parse
-	 */
 	@Test
+	@Order(1)
+	@DisplayName("Theme parsing can parse")
 	public void testCanParse() throws Exception {
 		final var actual = parseTheme("""
 			{ "settings": [
diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeResolvingTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeResolvingTest.java
index 30e9a3913..12f064c42 100644
--- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeResolvingTest.java
+++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeResolvingTest.java
@@ -12,17 +12,27 @@
 package org.eclipse.tm4e.core.internal.theme;
 
 import static org.eclipse.tm4e.core.internal.theme.FontStyle.*;
-import static org.junit.jupiter.api.Assertions.*;
 
 import java.util.List;
 
 import org.eclipse.tm4e.core.internal.utils.StringUtils;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.MethodOrderer;
+import org.junit.jupiter.api.Order;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestMethodOrder;
+
+import com.google.gson.ExclusionStrategy;
+import com.google.gson.FieldAttributes;
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
 
 /**
- * @see 
+ * @see 
  *      github.com/Microsoft/vscode-textmate/blob/master/src/tests/themes.test.ts
  */
+@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
 public class ThemeResolvingTest extends AbstractThemeTest {
 
 	private static final ThemeTrieElementRule NOTSET_THEME_TRIE_ELEMENT_RULE = new ThemeTrieElementRule(0, null, NotSet,
@@ -35,48 +45,9 @@ private static void assertStrArrCmp(final String testCase, final List a,
 		assertEquals(expected, StringUtils.strArrCmp(a, b), testCase);
 	}
 
-	/**
-	 * test: Theme parsing can parse
-	 */
-	@Test
-	public void testThemeParsingCanParse() throws Exception {
-		final var actual = parseTheme("""
-			{ "settings": [
-			{ "settings": { "foreground": "#F8F8F2", "background": "#272822" } },
-			{ "scope": "source, something", "settings": { "background": "#100000" } },
-			{ "scope": ["bar", "baz"], "settings": { "background": "#010000" } },
-			{ "scope": "source.css selector bar", "settings": { "fontStyle": "bold" } },
-			{ "scope": "constant", "settings": { "fontStyle": "italic", "foreground": "#ff0000" } },
-			{ "scope": "constant.numeric", "settings": { "foreground": "#00ff00" } },
-			{ "scope": "constant.numeric.hex", "settings": { "fontStyle": "bold" } },
-			{ "scope": "constant.numeric.oct", "settings": { "fontStyle": "bold italic underline" } },
-			{ "scope": "constant.numeric.bin", "settings": { "fontStyle": "bold strikethrough" } },
-			{ "scope": "constant.numeric.dec", "settings": { "fontStyle": "", "foreground": "#0000ff" } },
-			{ "scope": "foo", "settings": { "fontStyle": "", "foreground": "#CFA" } }
-			]}""");
-
-		final var expected = list(
-			new ParsedThemeRule("", null, 0, NotSet, "#F8F8F2", "#272822"),
-			new ParsedThemeRule("source", null, 1, NotSet, null, "#100000"),
-			new ParsedThemeRule("something", null, 1, NotSet, null, "#100000"),
-			new ParsedThemeRule("bar", null, 2, NotSet, null, "#010000"),
-			new ParsedThemeRule("baz", null, 2, NotSet, null, "#010000"),
-			new ParsedThemeRule("bar", list("selector", "source.css"), 3, Bold, null, null),
-			new ParsedThemeRule("constant", null, 4, Italic, "#ff0000", null),
-			new ParsedThemeRule("constant.numeric", null, 5, NotSet, "#00ff00", null),
-			new ParsedThemeRule("constant.numeric.hex", null, 6, Bold, null, null),
-			new ParsedThemeRule("constant.numeric.oct", null, 7, Bold | Italic | Underline, null, null),
-			new ParsedThemeRule("constant.numeric.bin", null, 8, Bold | Strikethrough, null, null),
-			new ParsedThemeRule("constant.numeric.dec", null, 9, None, "#0000ff", null),
-			new ParsedThemeRule("foo", null, 10, None, "#CFA", null));
-
-		assertArrayEquals(expected.toArray(), actual.toArray());
-	}
-
-	/**
-	 * test: Theme resolving strcmp works
-	 */
 	@Test
+	@Order(1)
+	@DisplayName("Theme resolving strcmp works")
 	public void testStrcmpWorks() {
 		final var actual = list("bar", "z", "zu", "a", "ab", "");
 		actual.sort(StringUtils::strcmp);
@@ -85,10 +56,9 @@ public void testStrcmpWorks() {
 		assertArrayEquals(expected.toArray(), actual.toArray());
 	}
 
-	/**
-	 * test: Theme resolving strArrCmp works
-	 */
 	@Test
+	@Order(2)
+	@DisplayName("Theme resolving strArrCmp works")
 	public void testStrArrCmpWorks() {
 		assertStrArrCmp("001", null, null, 0);
 		assertStrArrCmp("002", null, list(), -1);
@@ -106,26 +76,48 @@ public void testStrArrCmpWorks() {
 		assertStrArrCmp("014", list("a", "c"), list("a", "b"), 1);
 	}
 
-	/**
-	 * test: Theme resolving always has defaults
-	 */
+	protected static final Gson THEME_GSON = new GsonBuilder()
+		.setExclusionStrategies(new ExclusionStrategy() {
+			@Override
+			public boolean shouldSkipField(FieldAttributes f) {
+				return f.getDeclaredClass() == Theme.class
+					&& f.getName().equals("_cachedMatchRoot"); // ignore the cache objects
+			}
+
+			@Override
+			public boolean shouldSkipClass(Class clazz) {
+				return false;
+			}
+		})
+		.setPrettyPrinting().create();
+
+	private static void assertThemeEqual(Theme actual, Theme expected) {
+		// if this fails, we get a nice visual representation of the difference:
+		assertEquals(THEME_GSON.toJson(expected), THEME_GSON.toJson(actual));
+
+		// this ensures hashCode/equals are properly implemented:
+		assertEquals(expected, actual);
+	}
+
 	@Test
+	@Order(3)
+	@DisplayName("Theme resolving always has defaults")
 	public void testAlwaysHasDefaults() {
+
 		final var actual = createTheme();
 		final var colorMap = new ColorMap();
 		final int _A = colorMap.getId("#000000");
 		final int _B = colorMap.getId("#ffffff");
 		final var expected = new Theme(
 			colorMap,
-			new ThemeTrieElementRule(0, null, None, _A, _B),
+			new StyleAttributes(None, _A, _B),
 			NOTSET_THEME_TRIE_ELEMENT);
-		assertEquals(actual, expected);
+		assertThemeEqual(actual, expected);
 	}
 
-	/**
-	 * test: Theme resolving respects incoming defaults 1
-	 */
 	@Test
+	@Order(4)
+	@DisplayName("Theme resolving respects incoming defaults 1")
 	public void testRespectsIncomingDefaults1() {
 		final var actual = createTheme(new ParsedThemeRule("", null, -1, NotSet, null, null));
 		final var colorMap = new ColorMap();
@@ -133,15 +125,14 @@ public void testRespectsIncomingDefaults1() {
 		final int _B = colorMap.getId("#ffffff");
 		final var expected = new Theme(
 			colorMap,
-			new ThemeTrieElementRule(0, null, None, _A, _B),
+			new StyleAttributes(None, _A, _B),
 			NOTSET_THEME_TRIE_ELEMENT);
-		assertEquals(actual, expected);
+		assertThemeEqual(actual, expected);
 	}
 
-	/**
-	 * test: Theme resolving respects incoming defaults 2
-	 */
 	@Test
+	@Order(5)
+	@DisplayName("Theme resolving respects incoming defaults 2")
 	public void testRespectsIncomingDefaults2() {
 		final Theme actual = createTheme(new ParsedThemeRule("", null, -1, None, null, null));
 		final var colorMap = new ColorMap();
@@ -149,15 +140,14 @@ public void testRespectsIncomingDefaults2() {
 		final int _B = colorMap.getId("#ffffff");
 		final var expected = new Theme(
 			colorMap,
-			new ThemeTrieElementRule(0, null, None, _A, _B),
+			new StyleAttributes(None, _A, _B),
 			NOTSET_THEME_TRIE_ELEMENT);
-		assertEquals(actual, expected);
+		assertThemeEqual(actual, expected);
 	}
 
-	/**
-	 * test: Theme resolving respects incoming defaults 3
-	 */
 	@Test
+	@Order(6)
+	@DisplayName("Theme resolving respects incoming defaults 3")
 	public void testRespectsIncomingDefaults3() {
 		final var actual = createTheme(new ParsedThemeRule("", null, -1, Bold, null, null));
 		final var colorMap = new ColorMap();
@@ -165,15 +155,14 @@ public void testRespectsIncomingDefaults3() {
 		final int _B = colorMap.getId("#ffffff");
 		final var expected = new Theme(
 			colorMap,
-			new ThemeTrieElementRule(0, null, Bold, _A, _B),
+			new StyleAttributes(Bold, _A, _B),
 			NOTSET_THEME_TRIE_ELEMENT);
-		assertEquals(actual, expected);
+		assertThemeEqual(actual, expected);
 	}
 
-	/**
-	 * test: Theme resolving respects incoming defaults 4
-	 */
 	@Test
+	@Order(7)
+	@DisplayName("Theme resolving respects incoming defaults 4")
 	public void testRespectsIncomingDefaults4() {
 		final var actual = createTheme(new ParsedThemeRule("", null, -1, NotSet, "#ff0000", null));
 		final var colorMap = new ColorMap();
@@ -181,15 +170,14 @@ public void testRespectsIncomingDefaults4() {
 		final int _B = colorMap.getId("#ffffff");
 		final var expected = new Theme(
 			colorMap,
-			new ThemeTrieElementRule(0, null, None, _A, _B),
+			new StyleAttributes(None, _A, _B),
 			NOTSET_THEME_TRIE_ELEMENT);
-		assertEquals(actual, expected);
+		assertThemeEqual(actual, expected);
 	}
 
-	/**
-	 * test: Theme resolving respects incoming defaults 5
-	 */
 	@Test
+	@Order(8)
+	@DisplayName("Theme resolving respects incoming defaults 5")
 	public void testRespectsIncomingDefaults5() {
 		final var actual = createTheme(new ParsedThemeRule("", null, -1, NotSet, null, "#ff0000"));
 		final var colorMap = new ColorMap();
@@ -197,15 +185,14 @@ public void testRespectsIncomingDefaults5() {
 		final int _B = colorMap.getId("#ff0000");
 		final var expected = new Theme(
 			colorMap,
-			new ThemeTrieElementRule(0, null, None, _A, _B),
+			new StyleAttributes(None, _A, _B),
 			NOTSET_THEME_TRIE_ELEMENT);
-		assertEquals(actual, expected);
+		assertThemeEqual(actual, expected);
 	}
 
-	/**
-	 * test: Theme resolving can merge incoming defaults
-	 */
 	@Test
+	@Order(9)
+	@DisplayName("Theme resolving can merge incoming defaults")
 	public void testCanMergeIncomingDefaults() {
 		final var actual = createTheme(
 			new ParsedThemeRule("", null, -1, NotSet, null, "#ff0000"),
@@ -216,15 +203,14 @@ public void testCanMergeIncomingDefaults() {
 		final int _B = colorMap.getId("#ff0000");
 		final var expected = new Theme(
 			colorMap,
-			new ThemeTrieElementRule(0, null, Bold, _A, _B),
+			new StyleAttributes(Bold, _A, _B),
 			NOTSET_THEME_TRIE_ELEMENT);
-		assertEquals(actual, expected);
+		assertThemeEqual(actual, expected);
 	}
 
-	/**
-	 * test: Theme resolving defaults are inherited
-	 */
 	@Test
+	@Order(10)
+	@DisplayName("Theme resolving defaults are inherited")
 	public void testDefaultsAreInherited() {
 		final Theme actual = createTheme(
 			new ParsedThemeRule("", null, -1, NotSet, "#F8F8F2", "#272822"),
@@ -235,17 +221,16 @@ public void testDefaultsAreInherited() {
 		final int _C = colorMap.getId("#ff0000");
 		final var expected = new Theme(
 			colorMap,
-			new ThemeTrieElementRule(0, null, None, _A, _B),
+			new StyleAttributes(None, _A, _B),
 			new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, list(), map(
 				"var", new ThemeTrieElement(new ThemeTrieElementRule(1, null, NotSet, _C, _NOT_SET)) //
 			)));
-		assertEquals(actual, expected);
+		assertThemeEqual(actual, expected);
 	}
 
-	/**
-	 * test: Theme resolving same rules get merged
-	 */
 	@Test
+	@Order(11)
+	@DisplayName("Theme resolving same rules get merged")
 	public void testSameRulesGetMerged() {
 		final var actual = createTheme(
 			new ParsedThemeRule("", null, -1, NotSet, "#F8F8F2", "#272822"),
@@ -257,17 +242,16 @@ public void testSameRulesGetMerged() {
 		final int _C = colorMap.getId("#ff0000");
 		final var expected = new Theme(
 			colorMap,
-			new ThemeTrieElementRule(0, null, None, _A, _B),
+			new StyleAttributes(None, _A, _B),
 			new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, list(), map(
 				"var", new ThemeTrieElement(new ThemeTrieElementRule(1, null, Bold, _C, _NOT_SET)) //
 			)));
-		assertEquals(actual, expected);
+		assertThemeEqual(actual, expected);
 	}
 
-	/**
-	 * test: Theme resolving rules are inherited 1
-	 */
 	@Test
+	@Order(12)
+	@DisplayName("Theme resolving rules are inherited 1")
 	public void testRulesAreInherited1() {
 		final var actual = createTheme(
 			new ParsedThemeRule("", null, -1, NotSet, "#F8F8F2", "#272822"),
@@ -279,19 +263,18 @@ public void testRulesAreInherited1() {
 		final int _C = colorMap.getId("#ff0000");
 		final int _D = colorMap.getId("#00ff00");
 		final var expected = new Theme(colorMap,
-			new ThemeTrieElementRule(0, null, None, _A, _B),
+			new StyleAttributes(None, _A, _B),
 			new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, list(), map(
 				"var", new ThemeTrieElement(new ThemeTrieElementRule(1, null, Bold, _C, _NOT_SET), list(), map(
 					"identifier", new ThemeTrieElement(new ThemeTrieElementRule(2, null, Bold, _D, _NOT_SET)) //
 				)) //
 			)));
-		assertEquals(actual, expected);
+		assertThemeEqual(actual, expected);
 	}
 
-	/**
-	 * test: Theme resolving rules are inherited 2
-	 */
 	@Test
+	@Order(13)
+	@DisplayName("Theme resolving rules are inherited 2")
 	public void testRulesAreInherited2() {
 		final var actual = createTheme(
 			new ParsedThemeRule("", null, -1, NotSet, "#F8F8F2", "#272822"),
@@ -313,7 +296,7 @@ public void testRulesAreInherited2() {
 		final int _G = colorMap.getId("#00ff00");
 
 		final var expected = new Theme(colorMap,
-			new ThemeTrieElementRule(0, null, None, _A, _B),
+			new StyleAttributes(None, _A, _B),
 			new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, list(), map(
 				"var", new ThemeTrieElement(new ThemeTrieElementRule(1, null, Bold, _F, _NOT_SET), list(), map(
 					"identifier", new ThemeTrieElement(new ThemeTrieElementRule(2, null, Bold, _G, _NOT_SET)) //
@@ -327,13 +310,12 @@ public void testRulesAreInherited2() {
 						"dec", new ThemeTrieElement(new ThemeTrieElementRule(3, null, None, _E, _NOT_SET)) //
 					)))) //
 			)));
-		assertEquals(actual, expected);
+		assertThemeEqual(actual, expected);
 	}
 
-	/**
-	 * test: Theme resolving rules with parent scopes
-	 */
 	@Test
+	@Order(14)
+	@DisplayName("Theme resolving rules with parent scopes")
 	public void testRulesWithParentScopes() {
 		final var actual = createTheme(
 			new ParsedThemeRule("", null, -1, NotSet, "#F8F8F2", "#272822"),
@@ -348,7 +330,7 @@ public void testRulesWithParentScopes() {
 		final int _D = colorMap.getId("#300000");
 		final int _E = colorMap.getId("#200000");
 		final var expected = new Theme(colorMap,
-			new ThemeTrieElementRule(0, null, None, _A, _B),
+			new StyleAttributes(None, _A, _B),
 			new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, list(), map(
 				"var", new ThemeTrieElement(
 					new ThemeTrieElementRule(1, null, Bold, _C, _NOT_SET),
@@ -359,13 +341,12 @@ public void testRulesWithParentScopes() {
 					) //
 				) //
 			)));
-		assertEquals(actual, expected);
+		assertThemeEqual(actual, expected);
 	}
 
-	/**
-	 * test: Theme resolving issue #38: ignores rules with invalid colors
-	 */
 	@Test
+	@Order(15)
+	@DisplayName("Theme resolving issue #38: ignores rules with invalid colors")
 	public void testIssue_38_ignores_rules_with_invalid_colors() throws Exception {
 		final var actual = parseTheme("""
 			{ "settings": [
@@ -410,21 +391,20 @@ public void testIssue_38_ignores_rules_with_invalid_colors() throws Exception {
 				}
 			]}""");
 
-		final var expected = new ParsedThemeRule[] {
+		final var expected = list(
 			new ParsedThemeRule("", null, 0, NotSet, "#cccccc", "#222222"),
 			new ParsedThemeRule("variable", null, 1, None, null, null),
 			new ParsedThemeRule("variable.parameter", null, 2, Italic, null, null),
 			new ParsedThemeRule("support.other.variable", null, 3, None, null, null),
 			new ParsedThemeRule("variable.other", null, 4, None, null, null),
-			new ParsedThemeRule("variable.parameter.function.coffee", null, 5, Italic, "#F9D423", null)
-		};
-		assertArrayEquals(expected, actual.toArray());
+			new ParsedThemeRule("variable.parameter.function.coffee", null, 5, Italic, "#F9D423", null));
+
+		assertArrayEquals(expected.toArray(), actual.toArray());
 	}
 
-	/**
-	 * test: Theme resolving issue #35: Trailing comma in a tmTheme scope selector
-	 */
 	@Test
+	@Order(16)
+	@DisplayName("Theme resolving issue #35: Trailing comma in a tmTheme scope selector")
 	public void testIssue_35_Trailing_comma_in_a_tmTheme_scope_selector() throws Exception {
 		final var actual = parseTheme("""
 			{ "settings": [{
@@ -448,15 +428,15 @@ public void testIssue_35_Trailing_comma_in_a_tmTheme_scope_selector() throws Exc
 				}
 			]}""");
 
-		final var expected = new ParsedThemeRule[] {
+		final var expected = list(
 			new ParsedThemeRule("", null, 0, NotSet, "#EFEFEF", "#25292C"),
 			new ParsedThemeRule("meta.at-rule.return.scss", null, 1, NotSet, "#CC7832", null),
 			new ParsedThemeRule("punctuation.definition", list("meta.at-rule.return.scss"), 1, NotSet, "#CC7832", null),
 			new ParsedThemeRule("meta.at-rule.else.scss", null, 1, NotSet, "#CC7832", null),
 			new ParsedThemeRule("punctuation.definition", list("meta.at-rule.else.scss"), 1, NotSet, "#CC7832", null),
 			new ParsedThemeRule("meta.at-rule.if.scss", null, 1, NotSet, "#CC7832", null),
-			new ParsedThemeRule("punctuation.definition", list("meta.at-rule.if.scss"), 1, NotSet, "#CC7832", null)
-		};
-		assertArrayEquals(expected, actual.toArray());
+			new ParsedThemeRule("punctuation.definition", list("meta.at-rule.if.scss"), 1, NotSet, "#CC7832", null));
+
+		assertArrayEquals(expected.toArray(), actual.toArray());
 	}
 }
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/AttributedScopeStack.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/AttributedScopeStack.java
index 3564d3b41..6a616183e 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/AttributedScopeStack.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/AttributedScopeStack.java
@@ -11,35 +11,56 @@
  */
 package org.eclipse.tm4e.core.internal.grammar;
 
-import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 import java.util.Objects;
 
 import org.eclipse.jdt.annotation.Nullable;
 import org.eclipse.tm4e.core.internal.grammar.tokenattrs.EncodedTokenAttributes;
 import org.eclipse.tm4e.core.internal.theme.FontStyle;
-import org.eclipse.tm4e.core.internal.theme.ThemeTrieElementRule;
+import org.eclipse.tm4e.core.internal.theme.StyleAttributes;
 
 import com.google.common.base.Splitter;
 
 /**
  * @see 
- *      https://github.com/Microsoft/vscode-textmate/blob/main/src/grammar.ts
+ *      "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/grammar.ts#L417">
+ *      github.com/microsoft/vscode-textmate/blob/main/src/grammar.ts
  */
 public final class AttributedScopeStack {
 
 	private static final Splitter BY_SPACE_SPLITTER = Splitter.on(' ');
 
+	public static AttributedScopeStack createRoot(final String scopeName,
+		final int /*EncodedTokenAttributes*/ tokenAttributes) {
+		return new AttributedScopeStack(null, new ScopeStack(null, scopeName), tokenAttributes);
+	}
+
+	public static AttributedScopeStack createRootAndLookUpScopeName(final String scopeName,
+		final int encodedTokenAttributes, final Grammar grammar) {
+		final var rawRootMetadata = grammar.getMetadataForScope(scopeName);
+		final var scopePath = new ScopeStack(null, scopeName);
+		final var rootStyle = grammar.themeProvider.themeMatch(scopePath);
+
+		final var resolvedTokenAttributes = AttributedScopeStack.mergeAttributes(
+			encodedTokenAttributes,
+			rawRootMetadata,
+			rootStyle);
+
+		return new AttributedScopeStack(null, scopePath, resolvedTokenAttributes);
+	}
+
+	public String scopeName() {
+		return this.scopePath.scopeName;
+	}
+
 	@Nullable
 	private final AttributedScopeStack parent;
-	private final String scopePath;
+	private final ScopeStack scopePath;
 	final int tokenAttributes;
 
 	public AttributedScopeStack(
 		@Nullable final AttributedScopeStack parent,
-		final String scopePath,
+		final ScopeStack scopePath,
 		final int tokenAttributes) {
 		this.parent = parent;
 		this.scopePath = scopePath;
@@ -68,7 +89,7 @@ private static boolean _equals(
 				return false;
 			}
 
-			if (!Objects.equals(a.scopePath, b.scopePath) || a.tokenAttributes != b.tokenAttributes) {
+			if (!Objects.equals(a.scopeName(), b.scopeName()) || a.tokenAttributes != b.tokenAttributes) {
 				return false;
 			}
 
@@ -78,99 +99,64 @@ private static boolean _equals(
 		} while (true);
 	}
 
-	private static boolean matchesScope(final String scope, final String selector, final String selectorWithDot) {
-		return selector.equals(scope) || scope.startsWith(selectorWithDot);
-	}
-
-	/**
-	 * implementation differs from upstream in that it is prevents potential NPEs/IndexOutOfBoundExceptions
-	 */
-	private static boolean matches(@Nullable AttributedScopeStack target, @Nullable final List parentScopes) {
-		if (parentScopes == null || parentScopes.isEmpty()) {
-			return true;
-		}
-
-		if (target == null) {
-			return false;
-		}
-
-		parent_scopes_loop: for (final String selector : parentScopes) {
-			final var selectorWithDot = selector + '.';
-
-			while (target != null) {
-				if (matchesScope(target.scopePath, selector, selectorWithDot)) {
-					// match for current parent scope found, continue with checking next parent scope
-					continue parent_scopes_loop;
-				}
-				target = target.parent;
-			}
-			// no match for current parent scope found, early exit
-			return false;
-		}
-
-		// matches for all parent scopes found
-		return true;
-	}
-
 	public static int mergeAttributes(
 		final int existingTokenAttributes,
-		@Nullable final AttributedScopeStack scopesList,
-		@Nullable final BasicScopeAttributes basicScopeAttributes) {
-		if (basicScopeAttributes == null) {
-			return existingTokenAttributes;
-		}
-
-		int fontStyle = FontStyle.NotSet;
-		int foreground = 0;
-		int background = 0;
-
-		if (basicScopeAttributes.themeData != null) {
-			// Find the first themeData that matches
-			for (final ThemeTrieElementRule themeData : basicScopeAttributes.themeData) {
-				if (matches(scopesList, themeData.parentScopes)) {
-					fontStyle = themeData.fontStyle;
-					foreground = themeData.foreground;
-					background = themeData.background;
-					break;
-				}
-			}
+		final BasicScopeAttributes basicScopeAttributes,
+		@Nullable final StyleAttributes styleAttributes) {
+		var fontStyle = FontStyle.NotSet;
+		var foreground = 0;
+		var background = 0;
+
+		if (styleAttributes != null) {
+			fontStyle = styleAttributes.fontStyle;
+			foreground = styleAttributes.foregroundId;
+			background = styleAttributes.backgroundId;
 		}
 
-		return EncodedTokenAttributes.set(existingTokenAttributes, basicScopeAttributes.languageId,
-			basicScopeAttributes.tokenType, null, fontStyle,
+		return EncodedTokenAttributes.set(
+			existingTokenAttributes,
+			basicScopeAttributes.languageId,
+			basicScopeAttributes.tokenType,
+			null,
+			fontStyle,
 			foreground,
 			background);
 	}
 
-	private static AttributedScopeStack push(AttributedScopeStack target, final Grammar grammar,
-		final Iterable scopes) {
-		for (final String scope : scopes) {
-			final var rawMetadata = grammar.getMetadataForScope(scope);
-			final int metadata = mergeAttributes(target.tokenAttributes, target, rawMetadata);
-			target = new AttributedScopeStack(target, scope, metadata);
-		}
-		return target;
-	}
-
 	AttributedScopeStack pushAttributed(@Nullable final String scopePath, final Grammar grammar) {
 		if (scopePath == null) {
 			return this;
 		}
 
-		return AttributedScopeStack.push(this, grammar, BY_SPACE_SPLITTER.split(scopePath));
-	}
+		if (scopePath.indexOf(' ') == -1) {
+			// This is the common case and much faster
+			return _pushAttributed(this, scopePath, grammar);
+		}
 
-	private static List generateScopes(@Nullable AttributedScopeStack scopesList) {
-		final var result = new ArrayList();
-		while (scopesList != null) {
-			result.add(scopesList.scopePath);
-			scopesList = scopesList.parent;
+		final var scopes = BY_SPACE_SPLITTER.split(scopePath);
+		var result = this;
+		for (final var scope : scopes) {
+			result = _pushAttributed(result, scope, grammar);
 		}
-		Collections.reverse(result);
 		return result;
 	}
 
+	private AttributedScopeStack _pushAttributed(
+		final AttributedScopeStack target,
+		final String scopeName,
+		final Grammar grammar) {
+		final var rawMetadata = grammar.getMetadataForScope(scopeName);
+
+		final var newPath = target.scopePath.push(scopeName);
+		final var scopeThemeMatchResult = grammar.themeProvider.themeMatch(newPath);
+		final var metadata = mergeAttributes(
+			target.tokenAttributes,
+			rawMetadata,
+			scopeThemeMatchResult);
+		return new AttributedScopeStack(target, newPath, metadata);
+	}
+
 	List getScopeNames() {
-		return AttributedScopeStack.generateScopes(this);
+		return this.scopePath.getSegments();
 	}
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributes.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributes.java
index 34206eb88..37b6478e1 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributes.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributes.java
@@ -15,24 +15,18 @@
  */
 package org.eclipse.tm4e.core.internal.grammar;
 
-import java.util.List;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tm4e.core.internal.theme.ThemeTrieElementRule;
-
-public final class BasicScopeAttributes {
+/**
+ * @see 
+ *      github.com/microsoft/vscode-textmate/blob/main/src/basicScopesAttributeProvider.ts
+ */
+final class BasicScopeAttributes {
 
 	final int languageId;
 	final int /*OptionalStandardTokenType*/ tokenType;
 
-	@Nullable
-	final List themeData;
-
-	public BasicScopeAttributes(final int languageId,
-		final int /*OptionalStandardTokenType*/ tokenType,
-		@Nullable final List themeData) {
+	BasicScopeAttributes(final int languageId, final int /*OptionalStandardTokenType*/ tokenType) {
 		this.languageId = languageId;
 		this.tokenType = tokenType;
-		this.themeData = themeData;
 	}
 }
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java
index 55c489574..ec69c8e20 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BasicScopeAttributesProvider.java
@@ -15,74 +15,33 @@
  */
 package org.eclipse.tm4e.core.internal.grammar;
 
+import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*;
+
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 import java.util.regex.Pattern;
-import java.util.stream.Collectors;
 
 import org.eclipse.jdt.annotation.Nullable;
 import org.eclipse.tm4e.core.TMException;
 import org.eclipse.tm4e.core.internal.grammar.tokenattrs.OptionalStandardTokenType;
-import org.eclipse.tm4e.core.internal.theme.IThemeProvider;
-import org.eclipse.tm4e.core.internal.theme.ThemeTrieElementRule;
 import org.eclipse.tm4e.core.internal.utils.RegexSource;
 
 /**
  * @see 
- *      github.com/Microsoft/vscode-textmate/blob/master/src/grammar.ts
+ *      "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/basicScopesAttributeProvider.ts#L18">
+ *      github.com/microsoft/vscode-textmate/blob/main/src/basicScopesAttributeProvider.ts
  */
 final class BasicScopeAttributesProvider {
 
-	private final int initialLanguage;
-	private final IThemeProvider themeProvider;
-	private final Map cache = new HashMap<>();
-
-	private BasicScopeAttributes _defaultAttributes;
-	private final Map _embeddedLanguages = new HashMap<>();
-
-	@Nullable
-	private Pattern embeddedLanguagesRegex;
-
-	BasicScopeAttributesProvider(
-		final int initialLanguage,
-		final IThemeProvider themeProvider,
-		@Nullable final Map embeddedLanguages) {
-		this.initialLanguage = initialLanguage;
-		this.themeProvider = themeProvider;
-		this._defaultAttributes = new BasicScopeAttributes(
-			this.initialLanguage,
-			OptionalStandardTokenType.NotSet,
-			List.of(this.themeProvider.getDefaults()));
-
-		// embeddedLanguages handling
-		if (embeddedLanguages != null) {
-			// If embeddedLanguages are configured, fill in `this.embeddedLanguages`
-			this._embeddedLanguages.putAll(embeddedLanguages);
-		}
+	private final BasicScopeAttributes _defaultAttributes;
+	private final ScopeMatcher _embeddedLanguagesMatcher;
 
-		// create the regex
-		final var escapedScopes = this._embeddedLanguages.keySet().stream()
-			.map(RegexSource::escapeRegExpCharacters)
-			.collect(Collectors.toList());
-		if (escapedScopes.isEmpty()) {
-			// no scopes registered
-			this.embeddedLanguagesRegex = null;
-		} else {
-			this.embeddedLanguagesRegex = Pattern.compile("^(("
-				+ escapedScopes.stream().sorted(Collections.reverseOrder()).collect(Collectors.joining(")|("))
-				+ "))($|\\.)");
-		}
-	}
+	private final Map cache = new HashMap<>();
 
-	void onDidChangeTheme() {
-		this.cache.clear();
-		this._defaultAttributes = new BasicScopeAttributes(
-			this.initialLanguage,
-			OptionalStandardTokenType.NotSet,
-			List.of(this.themeProvider.getDefaults()));
+	BasicScopeAttributesProvider(final int initialLanguage, @Nullable final Map embeddedLanguages) {
+		this._defaultAttributes = new BasicScopeAttributes(initialLanguage, OptionalStandardTokenType.NotSet);
+		this._embeddedLanguagesMatcher = new ScopeMatcher<>(defaultIfNull(embeddedLanguages, Collections.emptyMap()));
 	}
 
 	BasicScopeAttributes getDefaultAttributes() {
@@ -93,43 +52,22 @@ BasicScopeAttributes getBasicScopeAttributes(@Nullable final String scopeName) {
 		if (scopeName == null) {
 			return BasicScopeAttributesProvider._NULL_SCOPE_METADATA;
 		}
-		var value = this.cache.get(scopeName);
-		if (value != null) {
-			return value;
-		}
-		value = this.doGetMetadataForScope(scopeName);
-		this.cache.put(scopeName, value);
-		return value;
-	}
 
-	private BasicScopeAttributes doGetMetadataForScope(final String scopeName) {
-		final int languageId = this._scopeToLanguage(scopeName);
-		final int standardTokenType = BasicScopeAttributesProvider._toStandardTokenType(scopeName);
-		final List themeData = this.themeProvider.themeMatch(scopeName);
-
-		return new BasicScopeAttributes(languageId, standardTokenType, themeData);
+		return cache.computeIfAbsent(scopeName, scopeName2 -> {
+			final var languageId = this._scopeToLanguage(scopeName);
+			final var standardTokenType = _toStandardTokenType(scopeName);
+			return new BasicScopeAttributes(languageId, standardTokenType);
+		});
 	}
 
-	private static final BasicScopeAttributes _NULL_SCOPE_METADATA = new BasicScopeAttributes(0, 0, null);
+	private static final BasicScopeAttributes _NULL_SCOPE_METADATA = new BasicScopeAttributes(0, 0);
 
 	/**
 	 * Given a produced TM scope, return the language that token describes or null if unknown.
 	 * e.g. source.html => html, source.css.embedded.html => css, punctuation.definition.tag.html => null
 	 */
 	private int _scopeToLanguage(final String scopeName) {
-		final var embeddedLanguagesRegex = this.embeddedLanguagesRegex;
-		if (embeddedLanguagesRegex == null) {
-			// no scopes registered
-			return 0;
-		}
-
-		final var m = embeddedLanguagesRegex.matcher(scopeName);
-		if (!m.find()) {
-			// no scopes matched
-			return 0;
-		}
-
-		return _embeddedLanguages.getOrDefault(m.group(1), 0);
+		return defaultIfNull(this._embeddedLanguagesMatcher.match(scopeName), 0);
 	}
 
 	private static int /*OptionalStandardTokenType*/ _toStandardTokenType(final String scopeName) {
@@ -149,4 +87,42 @@ private int _scopeToLanguage(final String scopeName) {
 
 	private static final Pattern STANDARD_TOKEN_TYPE_REGEXP = Pattern
 		.compile("\\b(comment|string|regex|meta\\.embedded)\\b");
+
+	private static final class ScopeMatcher {
+
+		private final Map values;
+		@Nullable
+		private final Pattern scopesRegExp;
+
+		ScopeMatcher(final Map values) {
+			if (values.isEmpty()) {
+				this.values = Collections.emptyMap();
+				this.scopesRegExp = null;
+			} else {
+				this.values = new HashMap<>(values);
+
+				// create the regex
+				final var escapedScopes = values.keySet().stream()
+					.map(RegexSource::escapeRegExpCharacters)
+					.sorted(Collections.reverseOrder()) // Longest scope first
+					.toArray(String[]::new);
+
+				scopesRegExp = Pattern.compile("^((" + String.join(")|(", escapedScopes) + "))($|\\.)");
+			}
+		}
+
+		@Nullable
+		TValue match(final String scopeName) {
+			final var scopesRegExp = this.scopesRegExp;
+			if (scopesRegExp == null) {
+				return null;
+			}
+			final var m = scopesRegExp.matcher(scopeName);
+			if (!m.find()) {
+				// no scopes matched
+				return null;
+			}
+			return this.values.get(m.group(1));
+		}
+	}
 }
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java
index ded406cd3..41cafc743 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java
@@ -37,11 +37,11 @@
 import org.eclipse.tm4e.core.internal.matcher.Matcher;
 import org.eclipse.tm4e.core.internal.oniguruma.OnigString;
 import org.eclipse.tm4e.core.internal.registry.IGrammarRepository;
+import org.eclipse.tm4e.core.internal.registry.IThemeProvider;
 import org.eclipse.tm4e.core.internal.rule.IRuleFactoryHelper;
 import org.eclipse.tm4e.core.internal.rule.Rule;
 import org.eclipse.tm4e.core.internal.rule.RuleFactory;
 import org.eclipse.tm4e.core.internal.rule.RuleId;
-import org.eclipse.tm4e.core.internal.theme.IThemeProvider;
 import org.eclipse.tm4e.core.internal.types.IRawGrammar;
 import org.eclipse.tm4e.core.internal.types.IRawRepository;
 import org.eclipse.tm4e.core.internal.types.IRawRule;
@@ -50,8 +50,8 @@
  * TextMate grammar implementation.
  *
  * @see 
- *      github.com/Microsoft/vscode-textmate/blob/master/src/grammar.ts
+ *      "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/grammar.ts#L99">
+ *      github.com/microsoft/vscode-textmate/blob/main/src/grammar.ts
  */
 public final class Grammar implements IGrammar, IRuleFactoryHelper {
 
@@ -89,7 +89,6 @@ public Grammar(
 		this.rootScopeName = rootScopeName;
 		this._basicScopeAttributesProvider = new BasicScopeAttributesProvider(
 			initialLanguage,
-			themeProvider,
 			embeddedLanguages);
 		this._grammarRepository = grammarRepository;
 		this._grammar = initGrammar(grammar, null);
@@ -107,10 +106,6 @@ public Grammar(
 		}
 	}
 
-	public void onDidChangeTheme() {
-		this._basicScopeAttributesProvider.onDidChangeTheme();
-	}
-
 	BasicScopeAttributes getMetadataForScope(final String scope) {
 		return this._basicScopeAttributesProvider.getBasicScopeAttributes(scope);
 	}
@@ -292,30 +287,31 @@ private  T _tokenize(
 		if (prevState == null || prevState.equals(StateStack.NULL)) {
 			isFirstLine = true;
 			final var rawDefaultMetadata = this._basicScopeAttributesProvider.getDefaultAttributes();
-			final var themeData = rawDefaultMetadata.themeData;
-			final var defaultTheme = themeData == null ? null : themeData.get(0);
+			final var defaultTheme = this.themeProvider.getDefaults();
 			final int defaultMetadata = EncodedTokenAttributes.set(
 				0,
 				rawDefaultMetadata.languageId,
 				rawDefaultMetadata.tokenType,
 				null,
 				defaultTheme.fontStyle,
-				defaultTheme.foreground,
-				defaultTheme.background);
+				defaultTheme.foregroundId,
+				defaultTheme.backgroundId);
 
 			final var rootScopeName = this.getRule(rootId).getName(
 				null,
 				null);
 
-			final var rawRootMetadata = this._basicScopeAttributesProvider.getBasicScopeAttributes(rootScopeName);
-			final int rootMetadata = AttributedScopeStack.mergeAttributes(defaultMetadata, null, rawRootMetadata);
-
-			final var scopeList = new AttributedScopeStack(
-				null,
-				rootScopeName == null
-					? "unknown"
-					: rootScopeName,
-				rootMetadata);
+			AttributedScopeStack scopeList;
+			if (rootScopeName != null) {
+				scopeList = AttributedScopeStack.createRootAndLookUpScopeName(
+					rootScopeName,
+					defaultMetadata,
+					this);
+			} else {
+				scopeList = AttributedScopeStack.createRoot(
+					"unknown",
+					defaultMetadata);
+			}
 
 			prevState = new StateStack(
 				null,
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/ScopeStack.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/ScopeStack.java
new file mode 100644
index 000000000..c30a70b03
--- /dev/null
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/ScopeStack.java
@@ -0,0 +1,83 @@
+/**
+ * Copyright (c) 2022 Sebastian Thomschke.
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Initial code from https://github.com/microsoft/vscode-textmate/
+ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
+ * Initial license: MIT
+ *
+ * Contributors:
+ * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
+ * - Sebastian Thomschke - translation and adaptation to Java
+ */
+package org.eclipse.tm4e.core.internal.grammar;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.jdt.annotation.Nullable;
+
+/**
+ * @see 
+ *      github.com/microsoft/vscode-textmate/blob/main/src/theme.ts
+ */
+public class ScopeStack {
+
+	public static ScopeStack from(final String first) {
+		return new ScopeStack(null, first);
+	}
+
+	@Nullable
+	public static ScopeStack from(final String... segments) {
+		ScopeStack result = null;
+		for (var i = 0; i < segments.length; i++) {
+			result = new ScopeStack(result, segments[i]);
+		}
+		return result;
+	}
+
+	@Nullable
+	public static ScopeStack from(final List segments) {
+		ScopeStack result = null;
+		for (var i = 0; i < segments.size(); i++) {
+			result = new ScopeStack(result, segments.get(i));
+		}
+		return result;
+	}
+
+	@Nullable
+	public final ScopeStack parent;
+	public final String scopeName;
+
+	public ScopeStack(@Nullable final ScopeStack parent, final String scopeName) {
+		this.parent = parent;
+		this.scopeName = scopeName;
+	}
+
+	public ScopeStack push(final String scopeName) {
+		return new ScopeStack(this, scopeName);
+	}
+
+	public List getSegments() {
+		@Nullable
+		ScopeStack item = this;
+		final var result = new ArrayList();
+		while (item != null) {
+			result.add(item.scopeName);
+			item = item.parent;
+		}
+		Collections.reverse(result);
+		return result;
+	}
+
+	@Override
+	public String toString() {
+		return String.join(" ", getSegments());
+	}
+}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StateStack.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StateStack.java
index 5762ffc44..7368f1f29 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StateStack.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/StateStack.java
@@ -32,8 +32,8 @@
  * Represents a "pushed" state on the stack (as a linked list element).
  *
  * @see 
- *      github.com/Microsoft/vscode-textmate/blob/master/src/grammar.ts
+ *      "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/grammar.ts#L550">
+ *      github.com/microsoft/vscode-textmate/blob/main/src/grammar.ts
  */
 public final class StateStack implements IStateStack {
 
@@ -44,8 +44,8 @@ public final class StateStack implements IStateStack {
 		0,
 		false,
 		null,
-		new AttributedScopeStack(null, "", 0),
-		new AttributedScopeStack(null, "", 0));
+		AttributedScopeStack.createRoot("", 0),
+		AttributedScopeStack.createRoot("", 0));
 
 	/**
 	 * The position on the current line where this state was pushed.
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/IThemeProvider.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/IThemeProvider.java
new file mode 100644
index 000000000..50106f679
--- /dev/null
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/IThemeProvider.java
@@ -0,0 +1,29 @@
+/**
+ * Copyright (c) 2015-2017 Angelo ZERR.
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Angelo Zerr  - initial API and implementation
+ */
+package org.eclipse.tm4e.core.internal.registry;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tm4e.core.internal.grammar.ScopeStack;
+import org.eclipse.tm4e.core.internal.theme.StyleAttributes;
+
+/**
+ * @see 
+ *      github.com/microsoft/vscode-textmate/blob/main/src/grammar.ts
+ */
+public interface IThemeProvider {
+
+	@Nullable
+	StyleAttributes themeMatch(ScopeStack scopePath);
+
+	StyleAttributes getDefaults();
+}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java
index 4255fdf85..57538ee10 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/registry/SyncRegistry.java
@@ -25,15 +25,15 @@
 import org.eclipse.tm4e.core.grammar.IGrammar;
 import org.eclipse.tm4e.core.internal.grammar.BalancedBracketSelectors;
 import org.eclipse.tm4e.core.internal.grammar.Grammar;
-import org.eclipse.tm4e.core.internal.theme.IThemeProvider;
+import org.eclipse.tm4e.core.internal.grammar.ScopeStack;
+import org.eclipse.tm4e.core.internal.theme.StyleAttributes;
 import org.eclipse.tm4e.core.internal.theme.Theme;
-import org.eclipse.tm4e.core.internal.theme.ThemeTrieElementRule;
 import org.eclipse.tm4e.core.internal.types.IRawGrammar;
 
 /**
  * @see 
- *      github.com/Microsoft/vscode-textmate/blob/master/src/registry.ts
+ *      "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/registry.ts">
+ *      github.com/microsoft/vscode-textmate/blob/main/src/registry.ts
  */
 public final class SyncRegistry implements IGrammarRepository, IThemeProvider {
 
@@ -48,7 +48,6 @@ public SyncRegistry(final Theme theme) {
 
 	public void setTheme(final Theme theme) {
 		this._theme = theme;
-		this._grammars.values().forEach(Grammar::onDidChangeTheme);
 	}
 
 	public List getColorMap() {
@@ -82,16 +81,17 @@ public Collection injections(final String targetScope) {
 	 * Get the default theme settings
 	 */
 	@Override
-	public ThemeTrieElementRule getDefaults() {
+	public StyleAttributes getDefaults() {
 		return this._theme.getDefaults();
 	}
 
 	/**
 	 * Match a scope in the theme.
 	 */
+	@Nullable
 	@Override
-	public List themeMatch(final String scopeName) {
-		return this._theme.match(scopeName);
+	public StyleAttributes themeMatch(final ScopeStack scopePath) {
+		return this._theme.match(scopePath);
 	}
 
 	/**
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ColorMap.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ColorMap.java
index c34c7519d..4646f8843 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ColorMap.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/ColorMap.java
@@ -27,7 +27,7 @@
 public final class ColorMap {
 
 	private boolean _isFrozen;
-	private int _lastColorId = 0;
+	private int _lastColorId = -1; // -1 and not 0 as in upstream project on purpose
 	private final List _id2color = new ArrayList<>();
 	private final Map _color2id = new LinkedHashMap<>();
 
@@ -69,16 +69,6 @@ public int getId(@Nullable final String _color) {
 		return value;
 	}
 
-	@Nullable
-	public String getColor(final int id) {
-		for (final var entry : _color2id.entrySet()) {
-			if (id == entry.getValue()) {
-				return entry.getKey();
-			}
-		}
-		return null;
-	}
-
 	public List getColorMap() {
 		return new ArrayList<>(_color2id.keySet());
 	}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/IThemeProvider.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/IThemeProvider.java
deleted file mode 100644
index 3a2099a9b..000000000
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/IThemeProvider.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Copyright (c) 2015-2017 Angelo ZERR.
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Angelo Zerr  - initial API and implementation
- */
-package org.eclipse.tm4e.core.internal.theme;
-
-import java.util.List;
-
-public interface IThemeProvider {
-
-	List themeMatch(String scopeName);
-
-	ThemeTrieElementRule getDefaults();
-
-}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/StyleAttributes.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/StyleAttributes.java
new file mode 100644
index 000000000..51a5dacb0
--- /dev/null
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/StyleAttributes.java
@@ -0,0 +1,64 @@
+/**
+ * Copyright (c) 2022 Sebastian Thomschke.
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Initial code from https://github.com/microsoft/vscode-textmate/
+ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
+ * Initial license: MIT
+ *
+ * Contributors:
+ * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
+ * - Sebastian Thomschke - translation and adaptation to Java
+ */
+package org.eclipse.tm4e.core.internal.theme;
+
+import org.eclipse.jdt.annotation.Nullable;
+
+/**
+ * @see 
+ *      github.com/microsoft/vscode-textmate/blob/main/src/theme.ts
+ */
+public class StyleAttributes {
+	public final int fontStyle;
+	public final int foregroundId;
+	public final int backgroundId;
+
+	public StyleAttributes(final int fontStyle, final int foregroundId, final int backgroundId) {
+		this.fontStyle = fontStyle;
+		this.foregroundId = foregroundId;
+		this.backgroundId = backgroundId;
+	}
+
+	@Override
+	public boolean equals(@Nullable final Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		final StyleAttributes other = (StyleAttributes) obj;
+		if (backgroundId != other.backgroundId)
+			return false;
+		if (fontStyle != other.fontStyle)
+			return false;
+		if (foregroundId != other.foregroundId)
+			return false;
+		return true;
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + backgroundId;
+		result = prime * result + fontStyle;
+		result = prime * result + foregroundId;
+		return result;
+	}
+}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java
index 6b302355c..ef93df00e 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java
@@ -22,6 +22,7 @@
 import java.util.Objects;
 
 import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tm4e.core.internal.grammar.ScopeStack;
 
 import com.google.common.base.Splitter;
 import com.google.common.collect.Lists;
@@ -30,8 +31,8 @@
  * TextMate theme.
  *
  * @see 
- *      github.com/Microsoft/vscode-textmate/blob/master/src/theme.ts
+ *      "https://github.com/microsoft/vscode-textmate/blob/e8d1fc5d04b2fc91384c7a895f6c9ff296a38ac8/src/theme.ts#L7">
+ *      github.com/microsoft/vscode-textmate/blob/main/src/theme.ts
  */
 public final class Theme {
 
@@ -53,10 +54,10 @@ public static Theme createFromParsedTheme(
 	private final Map> _cachedMatchRoot = new HashMap<>();
 
 	private final ColorMap _colorMap;
-	private final ThemeTrieElementRule _defaults;
+	private final StyleAttributes _defaults;
 	private final ThemeTrieElement _root;
 
-	public Theme(final ColorMap colorMap, final ThemeTrieElementRule defaults, final ThemeTrieElement root) {
+	public Theme(final ColorMap colorMap, final StyleAttributes defaults, final ThemeTrieElement root) {
 		this._colorMap = colorMap;
 		this._root = root;
 		this._defaults = defaults;
@@ -66,15 +67,59 @@ public List getColorMap() {
 		return this._colorMap.getColorMap();
 	}
 
-	public ThemeTrieElementRule getDefaults() {
+	public StyleAttributes getDefaults() {
 		return this._defaults;
 	}
 
-	public List match(final String scopeName) {
-		if (!this._cachedMatchRoot.containsKey(scopeName)) {
-			this._cachedMatchRoot.put(scopeName, this._root.match(scopeName));
+	@Nullable
+	public StyleAttributes match(@Nullable final ScopeStack scopePath) {
+		if (scopePath == null) {
+			return this._defaults;
+		}
+		final var scopeName = scopePath.scopeName;
+
+		final var matchingTrieElements = this._cachedMatchRoot.computeIfAbsent(
+			scopeName,
+			k -> this._root.match(k));
+
+		final var effectiveRule = findFirstMatching(matchingTrieElements,
+			v -> _scopePathMatchesParentScopes(scopePath.parent, v.parentScopes));
+		if (effectiveRule == null) {
+			return null;
+		}
+
+		return new StyleAttributes(
+			effectiveRule.fontStyle,
+			effectiveRule.foreground,
+			effectiveRule.background);
+	}
+
+	private boolean _scopePathMatchesParentScopes(@Nullable ScopeStack scopePath,
+		@Nullable final List parentScopeNames) {
+		if (parentScopeNames == null) {
+			return true;
+		}
+
+		var index = 0;
+		var scopePattern = parentScopeNames.get(index);
+
+		while (scopePath != null) {
+			if (_matchesScope(scopePath.scopeName, scopePattern)) {
+				index++;
+				if (index == parentScopeNames.size()) {
+					return true;
+				}
+				scopePattern = parentScopeNames.get(index);
+			}
+			scopePath = scopePath.parent;
 		}
-		return this._cachedMatchRoot.get(scopeName);
+
+		return false;
+	}
+
+	private boolean _matchesScope(final String scopeName, final String scopeNamePattern) {
+		return scopeNamePattern.equals(scopeName)
+			|| scopeName.startsWith(scopeNamePattern) && scopeName.charAt(scopeNamePattern.length()) == '.';
 	}
 
 	/**
@@ -220,7 +265,7 @@ public static Theme resolveParsedThemeRules(final List _parsedT
 			}
 		}
 		final var colorMap = new ColorMap(_colorMap);
-		final var defaults = new ThemeTrieElementRule(0, null, defaultFontStyle, colorMap.getId(defaultForeground),
+		final var defaults = new StyleAttributes(defaultFontStyle, colorMap.getId(defaultForeground),
 			colorMap.getId(defaultBackground));
 
 		final var root = new ThemeTrieElement(new ThemeTrieElementRule(0, null, FontStyle.NotSet, 0, 0),
@@ -234,11 +279,6 @@ public static Theme resolveParsedThemeRules(final List _parsedT
 		return new Theme(colorMap, defaults, root);
 	}
 
-	@Nullable
-	public String getColor(final int id) {
-		return this._colorMap.getColor(id);
-	}
-
 	@Override
 	public int hashCode() {
 		final int prime = 31;
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/MoreCollections.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/MoreCollections.java
index 010f7bfbf..64fea345b 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/MoreCollections.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils/MoreCollections.java
@@ -15,6 +15,7 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+import java.util.function.Predicate;
 
 import org.eclipse.jdt.annotation.Nullable;
 
@@ -27,6 +28,15 @@ public static  List asArrayList(final T firstItem, final List moreItems
 		return list;
 	}
 
+	@Nullable
+	public static  T findFirstMatching(final List list, final Predicate filter) {
+		for (final T e : list) {
+			if (filter.test(e))
+				return e;
+		}
+		return null;
+	}
+
 	@Nullable
 	public static  T findLastElement(@Nullable final List list) {
 		if (list == null || list.isEmpty())

From 6bb73aa8efc0c1e5ab6cede058ba00a61e97e325 Mon Sep 17 00:00:00 2001
From: sebthom 
Date: Tue, 17 May 2022 21:54:10 +0200
Subject: [PATCH 40/41] Improve test cases

---
 .../tm4e/core/grammar/GrammarTest.java        |  116 +-
 .../tm4e/core/grammar/GrammarTest2.java       |   83 -
 .../EncodedTokenAttributesTest.java           |   68 +-
 .../core/internal/parser/PListParserTest.java |   30 +-
 .../eclipse/tm4e/core/raytracer_tokens.txt    | 3893 +++++++++++++++++
 5 files changed, 4088 insertions(+), 102 deletions(-)
 delete mode 100644 org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest2.java
 create mode 100644 org.eclipse.tm4e.core/src/test/resources/org/eclipse/tm4e/core/raytracer_tokens.txt

diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest.java
index a903ec055..7fd963fe2 100644
--- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest.java
+++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest.java
@@ -12,16 +12,27 @@
 package org.eclipse.tm4e.core.grammar;
 
 import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*;
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.StringReader;
+import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
 
 import org.eclipse.tm4e.core.Data;
 import org.eclipse.tm4e.core.registry.IGrammarSource;
 import org.eclipse.tm4e.core.registry.Registry;
 import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 
 /**
  * Test for grammar tokenizer.
- *
  */
 public class GrammarTest {
 
@@ -61,7 +72,7 @@ public class GrammarTest {
 		"Token from 14 to 15 with scopes [source.js, meta.function.js, meta.decl.block.js, meta.brace.curly.js]" };
 
 	@Test
-	public void tokenizeLine() throws Exception {
+	public void tokenizeSingleLineExpression() throws Exception {
 		final var registry = new Registry();
 		final IGrammar grammar = registry.addGrammar(IGrammarSource.fromResource(Data.class, "JavaScript.tmLanguage"));
 		final ITokenizeLineResult lineTokens = castNonNull(grammar).tokenizeLine("function add(a,b) { return a+b; }");
@@ -74,7 +85,7 @@ public void tokenizeLine() throws Exception {
 	}
 
 	@Test
-	public void tokenizeLines() throws Exception {
+	public void tokenizeMultilineExpression() throws Exception {
 		final var registry = new Registry();
 		final IGrammar grammar = registry.addGrammar(IGrammarSource.fromResource(Data.class, "JavaScript.tmLanguage"));
 
@@ -93,6 +104,105 @@ public void tokenizeLines() throws Exception {
 			}
 			j = i;
 		}
+	}
+
+	@Test
+	public void tokenizeMultilineYaml() throws Exception {
+		final var registry = new Registry();
+		final var grammar = registry.addGrammar(IGrammarSource.fromResource(Data.class, "yaml.tmLanguage.json"));
+		final var lines = ">\n should.be.string.unquoted.block.yaml\n should.also.be.string.unquoted.block.yaml";
+		final var result = TokenizationUtils.tokenizeText(lines, grammar).iterator();
+		assertTrue(Arrays.stream(result.next().getTokens()).anyMatch(t -> t.getScopes().contains(
+			"keyword.control.flow.block-scalar.folded.yaml")));
+		assertTrue(Arrays.stream(result.next().getTokens())
+			.anyMatch(t -> t.getScopes().contains("string.unquoted.block.yaml")));
+		assertTrue(Arrays.stream(result.next().getTokens())
+			.anyMatch(t -> t.getScopes().contains("string.unquoted.block.yaml")));
+	}
+
+	@Test
+	void tokenizeTypeScriptFile() throws Exception {
+
+		final var grammar = new Registry()
+			.addGrammar(IGrammarSource.fromResource(Data.class, "TypeScript.tmLanguage.json"));
+
+		final List expectedTokens;
+		try (var resource = Data.class.getResourceAsStream("raytracer_tokens.txt")) {
+			expectedTokens = new BufferedReader(new InputStreamReader(resource, StandardCharsets.UTF_8))
+				.lines()
+				.collect(Collectors.toList());
+		}
+
+		IStateStack stateStack = null;
+		int tokenIndex = -1;
+		try (var reader = new BufferedReader(new InputStreamReader(Data.class.getResourceAsStream("raytracer.ts")))) {
+			while (reader.ready()) {
+				final var lineTokens = grammar.tokenizeLine(reader.readLine(), stateStack);
+				stateStack = lineTokens.getRuleStack();
+				for (int i = 0; i < lineTokens.getTokens().length; i++) {
+					tokenIndex++;
+					final var token = lineTokens.getTokens()[i];
+					Assertions.assertEquals(
+						expectedTokens.get(tokenIndex),
+						"Token from " + token.getStartIndex() + " to " + token.getEndIndex() + " with scopes "
+							+ token.getScopes());
+				}
+			}
+		}
+	}
+
+	// TODO see https://github.com/microsoft/vscode-textmate/issues/173
+	@Disabled
+	@Test
+	void testShadowedRulesAreResolvedCorrectly() {
+		final var registry = new Registry();
+		final var grammar = registry.addGrammar(new IGrammarSource() {
+
+			@Override
+			public Reader getReader() throws IOException {
+				return new StringReader("""
+					{
+						"scopeName": "source.test",
+						"repository": {
+							"foo": {
+								"include": "#bar"
+							},
+							"bar": {
+								"match": "bar1",
+								"name": "outer"
+							}
+						},
+						"patterns": [{
+								"patterns": [{
+									"include": "#foo"
+								}],
+								"repository": {
+									"bar": {
+										"match": "bar1",
+										"name": "inner"
+									}
+								}
+							},
+							{
+								"begin": "begin",
+								"patterns": [{
+									"include": "#foo"
+								}],
+								"end": "end"
+							}
+						]
+					}
+					""");
+			}
+
+			@Override
+			public String getFilePath() {
+				return "test-grammar.json";
+			}
+		});
 
+		final var result = grammar.tokenizeLine("bar1");
+		assertEquals("[{startIndex: 0, endIndex: 4, scopes: [source.test, outer]}]",
+			Arrays.toString(result.getTokens()));
 	}
 }
diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest2.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest2.java
deleted file mode 100644
index 072bb13c8..000000000
--- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/grammar/GrammarTest2.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Copyright (c) 2015-2017 Angelo ZERR.
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Angelo Zerr  - initial API and implementation
- */
-package org.eclipse.tm4e.core.grammar;
-
-import static org.junit.jupiter.api.Assertions.*;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.eclipse.tm4e.core.Data;
-import org.eclipse.tm4e.core.registry.IGrammarSource;
-import org.eclipse.tm4e.core.registry.Registry;
-import org.junit.jupiter.api.Test;
-
-/**
- * Test for grammar tokenizer.
- *
- */
-class GrammarTest2 {
-
-	@Test
-	void tokenizeLines() throws Exception {
-		final var registry = new Registry();
-		final var grammar = registry.addGrammar(IGrammarSource.fromResource(Data.class, "JavaScript.tmLanguage"));
-
-		IStateStack ruleStack = null;
-		int i = 0;
-
-		final var lines = new ArrayList();
-		try (var reader = new BufferedReader(new InputStreamReader(Data.class.getResourceAsStream("raytracer.ts")));) {
-			String line = null;
-			while ((line = reader.readLine()) != null) {
-				lines.add(line);
-			}
-		}
-
-		int t = 0;
-		boolean stop = false;
-		final long start = System.currentTimeMillis();
-		for (final String line : lines) {
-			final ITokenizeLineResult lineTokens = grammar.tokenizeLine(line, ruleStack);
-			if (stop) {
-				t = 1000;
-				Thread.sleep(t);
-				stop = false;
-			}
-			ruleStack = lineTokens.getRuleStack();
-			for (i = 0; i < lineTokens.getTokens().length; i++) {
-				final IToken token = lineTokens.getTokens()[i];
-				final var s = "Token from " + token.getStartIndex() + " to " + token.getEndIndex() + " with scopes "
-					+ token.getScopes();
-				// System.err.println(s);
-				// Assert.assertEquals(EXPECTED_MULTI_LINE_TOKENS[i + j], s);
-			}
-		}
-		System.out.println(System.currentTimeMillis() - start - t);
-	}
-
-	@Test
-	public void testYamlMultiline() throws Exception {
-		final var registry = new Registry();
-		final var grammar = registry.addGrammar(IGrammarSource.fromResource(Data.class, "yaml.tmLanguage.json"));
-		final var lines = ">\n should.be.string.unquoted.block.yaml\n should.also.be.string.unquoted.block.yaml";
-		final var result = TokenizationUtils.tokenizeText(lines, grammar).iterator();
-		assertTrue(Arrays.stream(result.next().getTokens()).anyMatch(t -> t.getScopes().contains(
-			"keyword.control.flow.block-scalar.folded.yaml")));
-		assertTrue(Arrays.stream(result.next().getTokens())
-			.anyMatch(t -> t.getScopes().contains("string.unquoted.block.yaml")));
-		assertTrue(Arrays.stream(result.next().getTokens())
-			.anyMatch(t -> t.getScopes().contains("string.unquoted.block.yaml")));
-	}
-}
diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributesTest.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributesTest.java
index d9602069d..d5622ca4f 100644
--- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributesTest.java
+++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/grammar/tokenattrs/EncodedTokenAttributesTest.java
@@ -14,7 +14,11 @@
 import static org.eclipse.tm4e.core.internal.theme.FontStyle.*;
 
 import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.MethodOrderer;
+import org.junit.jupiter.api.Order;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestMethodOrder;
 
 /**
  * {@link EncodedTokenAttributes} tests same than vscode-textmate.
@@ -22,70 +26,108 @@
  * @see 
  *      github.com/Microsoft/vscode-textmate/blob/master/src/tests/grammar.test.ts
  */
+@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
 public class EncodedTokenAttributesTest {
 
 	@Test
+	@Order(1)
+	@DisplayName("StackElementMetadata works")
 	public void testWorks() {
-		final int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, null, Underline | Bold, 101,
+		final int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, false, Underline | Bold,
+			101,
 			102);
 		assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102);
 	}
 
 	@Test
+	@Order(2)
+	@DisplayName("StackElementMetadata can overwrite languageId")
 	public void testCanOverwriteLanguageId() {
-		int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, null, Underline | Bold, 101, 102);
+		int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, false, Underline | Bold, 101,
+			102);
 		assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102);
 
-		value = EncodedTokenAttributes.set(value, 2, OptionalStandardTokenType.NotSet, null, NotSet, 0, 0);
+		value = EncodedTokenAttributes.set(value, 2, OptionalStandardTokenType.NotSet, false, NotSet, 0, 0);
 		assertEquals(value, 2, StandardTokenType.RegEx, false, Underline | Bold, 101, 102);
 	}
 
 	@Test
+	@Order(3)
+	@DisplayName("StackElementMetadata can overwrite tokenType")
 	public void testCanOverwriteTokenType() {
-		int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, null, Underline | Bold, 101, 102);
+		int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, false, Underline | Bold, 101,
+			102);
 		assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102);
 
-		value = EncodedTokenAttributes.set(value, 0, OptionalStandardTokenType.Comment, null, NotSet, 0, 0);
+		value = EncodedTokenAttributes.set(value, 0, OptionalStandardTokenType.Comment, false, NotSet, 0, 0);
 		assertEquals(value, 1, StandardTokenType.Comment, false, Underline | Bold, 101, 102);
 	}
 
 	@Test
+	@Order(4)
+	@DisplayName("StackElementMetadata can overwrite font style")
 	public void testCanOverwriteFontStyle() {
-		int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, null, Underline | Bold, 101, 102);
+		int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, false, Underline | Bold, 101,
+			102);
 		assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102);
 
-		value = EncodedTokenAttributes.set(value, 0, OptionalStandardTokenType.NotSet, null, None, 0, 0);
+		value = EncodedTokenAttributes.set(value, 0, OptionalStandardTokenType.NotSet, false, None, 0, 0);
 		assertEquals(value, 1, StandardTokenType.RegEx, false, None, 101, 102);
 	}
 
 	@Test
+	@Order(5)
+	@DisplayName("StackElementMetadata can overwrite font style with strikethrough")
 	public void testCanOverwriteFontStyleWithStrikethrough() {
-		int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, null, Strikethrough, 101, 102);
+		int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, false, Strikethrough, 101, 102);
 		assertEquals(value, 1, StandardTokenType.RegEx, false, Strikethrough, 101, 102);
 
-		value = EncodedTokenAttributes.set(value, 0, OptionalStandardTokenType.NotSet, null, None, 0, 0);
+		value = EncodedTokenAttributes.set(value, 0, OptionalStandardTokenType.NotSet, false, None, 0, 0);
 		assertEquals(value, 1, StandardTokenType.RegEx, false, None, 101, 102);
 	}
 
 	@Test
+	@Order(6)
+	@DisplayName("StackElementMetadata can overwrite foreground")
 	public void testCanOverwriteForeground() {
-		int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, null, Underline | Bold, 101, 102);
+		int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, false, Underline | Bold, 101,
+			102);
 		assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102);
 
-		value = EncodedTokenAttributes.set(value, 0, OptionalStandardTokenType.NotSet, null, NotSet, 5, 0);
+		value = EncodedTokenAttributes.set(value, 0, OptionalStandardTokenType.NotSet, false, NotSet, 5, 0);
 		assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 5, 102);
 	}
 
 	@Test
+	@Order(7)
+	@DisplayName("StackElementMetadata can overwrite background")
 	public void testCanOverwriteBackground() {
-		int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, null, Underline | Bold, 101, 102);
+		int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, false, Underline | Bold, 101,
+			102);
 		assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102);
 
-		value = EncodedTokenAttributes.set(value, 0, OptionalStandardTokenType.NotSet, null, NotSet, 0, 7);
+		value = EncodedTokenAttributes.set(value, 0, OptionalStandardTokenType.NotSet, false, NotSet, 0, 7);
 		assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 7);
 	}
 
 	@Test
+	@Order(8)
+	@DisplayName("StackElementMetadata can overwrite balanced bracket bit")
+	public void testCanOverwriteBalancedBracketBit() {
+		int value = EncodedTokenAttributes.set(0, 1, OptionalStandardTokenType.RegEx, false, Underline | Bold, 101,
+			102);
+		assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102);
+
+		value = EncodedTokenAttributes.set(value, 0, OptionalStandardTokenType.NotSet, true, NotSet, 0, 0);
+		assertEquals(value, 1, StandardTokenType.RegEx, true, Underline | Bold, 101, 102);
+
+		value = EncodedTokenAttributes.set(value, 0, OptionalStandardTokenType.NotSet, false, NotSet, 0, 0);
+		assertEquals(value, 1, StandardTokenType.RegEx, false, Underline | Bold, 101, 102);
+	}
+
+	@Test
+	@Order(9)
+	@DisplayName("StackElementMetadata can work at max values")
 	public void testCanWorkAtMaxValues() {
 		final int maxLangId = 255;
 		final int maxTokenType = StandardTokenType.Comment | StandardTokenType.Other | StandardTokenType.RegEx
diff --git a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/parser/PListParserTest.java b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/parser/PListParserTest.java
index f1c0d46ff..07bb33505 100644
--- a/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/parser/PListParserTest.java
+++ b/org.eclipse.tm4e.core/src/test/java/org/eclipse/tm4e/core/internal/parser/PListParserTest.java
@@ -14,12 +14,17 @@
 import static org.junit.jupiter.api.Assertions.*;
 
 import java.io.InputStreamReader;
+import java.util.List;
+import java.util.Set;
 
 import org.eclipse.tm4e.core.Data;
 import org.eclipse.tm4e.core.internal.grammar.RawGrammar;
 import org.eclipse.tm4e.core.internal.grammar.reader.GrammarReader;
+import org.junit.jupiter.api.MethodOrderer;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestMethodOrder;
 
+@TestMethodOrder(MethodOrderer.MethodName.class)
 public class PListParserTest {
 
 	@Test
@@ -28,8 +33,15 @@ void testParseJSONPList() throws Exception {
 		try (final var is = Data.class.getResourceAsStream("csharp.json")) {
 			final var grammar = parser.parse(new InputStreamReader(is));
 			assertNotNull(grammar);
+			assertNotNull(grammar.getRepository());
 			assertFalse(grammar.getFileTypes().isEmpty());
-			System.out.println(grammar);
+			assertEquals(List.of("cs"), grammar.getFileTypes());
+			assertEquals("C#", grammar.getName());
+			assertEquals("source.cs", grammar.getScopeName());
+			assertEquals(List.of("cs"), grammar.getFileTypes());
+			assertEquals(Set.of(
+				"fileTypes", "foldingStartMarker", "foldingStopMarker", "name", "patterns", "repository", "scopeName"),
+				grammar.keySet());
 		}
 	}
 
@@ -39,8 +51,14 @@ void testParseYAMLPlist() throws Exception {
 		try (final var is = Data.class.getResourceAsStream("JavaScript.tmLanguage.yaml")) {
 			final var grammar = parser.parse(new InputStreamReader(is));
 			assertNotNull(grammar);
+			assertNotNull(grammar.getRepository());
 			assertFalse(grammar.getFileTypes().isEmpty());
-			System.out.println(grammar);
+			assertEquals(List.of("js", "jsx"), grammar.getFileTypes());
+			assertEquals("JavaScript (with React support)", grammar.getName());
+			assertEquals("source.js", grammar.getScopeName());
+			assertEquals(Set.of(
+				"fileTypes", "name", "patterns", "repository", "scopeName", "uuid"),
+				grammar.keySet());
 		}
 	}
 
@@ -50,8 +68,14 @@ void testParseXMLPlist() throws Exception {
 		try (final var is = Data.class.getResourceAsStream("JavaScript.tmLanguage")) {
 			final var grammar = parser.parse(new InputStreamReader(is));
 			assertNotNull(grammar);
+			assertNotNull(grammar.getRepository());
 			assertFalse(grammar.getFileTypes().isEmpty());
-			System.out.println(grammar);
+			assertEquals(List.of("js", "jsx"), grammar.getFileTypes());
+			assertEquals("JavaScript (with React support)", grammar.getName());
+			assertEquals("source.js", grammar.getScopeName());
+			assertEquals(Set.of(
+				"fileTypes", "name", "patterns", "repository", "scopeName", "uuid"),
+				grammar.keySet());
 		}
 	}
 }
diff --git a/org.eclipse.tm4e.core/src/test/resources/org/eclipse/tm4e/core/raytracer_tokens.txt b/org.eclipse.tm4e.core/src/test/resources/org/eclipse/tm4e/core/raytracer_tokens.txt
new file mode 100644
index 000000000..bfd31d5ae
--- /dev/null
+++ b/org.eclipse.tm4e.core/src/test/resources/org/eclipse/tm4e/core/raytracer_tokens.txt
@@ -0,0 +1,3893 @@
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 5 with scopes [source.ts, meta.class.ts, storage.type.class.ts]
+Token from 5 to 6 with scopes [source.ts, meta.class.ts]
+Token from 6 to 12 with scopes [source.ts, meta.class.ts, entity.name.type.class.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts]
+Token from 13 to 14 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, storage.type.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 16 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, storage.modifier.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 26 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, support.type.primitive.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 16 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, storage.modifier.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 26 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, support.type.primitive.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 16 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, storage.modifier.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 26 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, support.type.primitive.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 33 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 4 to 5 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 20 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, support.type.primitive.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 31 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 41 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 47 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 48 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 51 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts]
+Token from 52 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts, entity.name.type.ts]
+Token from 58 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 59 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 60 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 61 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 62 to 63 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 63 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 64 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 65 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 66 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 67 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 68 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 69 to 70 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 70 to 71 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 71 to 72 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 72 to 73 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 73 to 74 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 74 to 75 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 75 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 76 to 77 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 77 to 78 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 78 to 79 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 79 to 80 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 80 to 81 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 81 to 82 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 82 to 83 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 83 to 84 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 84 to 85 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 85 to 86 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 86 to 87 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 87 to 88 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 17 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 21 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 29 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 33 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 43 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 50 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 53 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts]
+Token from 54 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts, entity.name.type.ts]
+Token from 60 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 61 to 63 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 63 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 64 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 65 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 66 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 67 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 68 to 70 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 70 to 71 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 71 to 72 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 72 to 73 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 73 to 74 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 74 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 76 to 77 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 77 to 78 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 78 to 79 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 79 to 80 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 80 to 81 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 81 to 83 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 83 to 84 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 84 to 85 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 85 to 86 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 86 to 87 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 87 to 89 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 89 to 90 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 90 to 91 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 91 to 92 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 92 to 93 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 93 to 94 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 94 to 96 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 96 to 97 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 97 to 98 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 98 to 99 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 99 to 100 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 100 to 101 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 101 to 102 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 16 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 20 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 28 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 32 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 42 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 48 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 49 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 52 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts]
+Token from 53 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts, entity.name.type.ts]
+Token from 59 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 60 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 62 to 63 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 63 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 64 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 65 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 66 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 67 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 69 to 70 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 70 to 71 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 71 to 72 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 72 to 73 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 73 to 75 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 75 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 76 to 77 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 77 to 78 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 78 to 79 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 79 to 80 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 80 to 82 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 82 to 83 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 83 to 84 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 84 to 85 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 85 to 86 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 86 to 88 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 88 to 89 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 89 to 90 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 90 to 91 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 91 to 92 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 92 to 93 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 93 to 95 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 95 to 96 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 96 to 97 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 97 to 98 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 98 to 99 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 99 to 100 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 100 to 101 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 15 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 19 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 27 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 31 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 41 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 47 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 48 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 51 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 52 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 53 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 55 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 57 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 58 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 59 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 60 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 61 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 62 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 64 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 65 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 66 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 67 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 68 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 69 to 71 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 71 to 72 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 72 to 73 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 73 to 74 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 74 to 75 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 75 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 76 to 78 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 78 to 79 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 79 to 80 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 80 to 81 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 81 to 82 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 82 to 83 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 83 to 85 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 85 to 86 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 86 to 87 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 87 to 88 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 88 to 89 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 89 to 90 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 18 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 28 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 35 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.constant.math.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 40 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.function.math.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 46 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 47 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 48 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 51 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 52 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 53 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 55 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 56 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 57 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 58 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 59 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 60 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 61 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 62 to 63 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 63 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 64 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 65 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 66 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 67 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 68 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 69 to 70 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 70 to 71 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 71 to 72 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 72 to 73 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 73 to 74 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 74 to 75 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 75 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 76 to 77 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 77 to 78 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 78 to 79 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 79 to 80 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 80 to 81 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 81 to 82 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 19 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 12 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 18 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 25 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 12 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 19 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 23 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.comparison.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.ternary.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 32 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.language.infinity.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.ternary.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 46 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 47 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.arithmetic.ts]
+Token from 48 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 49 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 52 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 15 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 22 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, entity.name.function.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 28 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 33 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 4 to 5 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 17 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 21 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 29 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 33 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 15 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts]
+Token from 19 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts, entity.name.type.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 26 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 33 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 40 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 46 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 47 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 51 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 0 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 26 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 33 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 40 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 46 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 47 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 51 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 0 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 26 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 33 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 40 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 46 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 47 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 51 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 52 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 4 to 5 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 5 with scopes [source.ts, meta.class.ts, storage.type.class.ts]
+Token from 5 to 6 with scopes [source.ts, meta.class.ts]
+Token from 6 to 11 with scopes [source.ts, meta.class.ts, entity.name.type.class.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, storage.type.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 16 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, storage.modifier.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 26 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, support.type.primitive.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 16 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, storage.modifier.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 26 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, support.type.primitive.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 16 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, storage.modifier.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 26 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, support.type.primitive.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 33 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 4 to 5 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 20 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, support.type.primitive.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 31 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 40 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 46 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 47 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts]
+Token from 51 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts, entity.name.type.ts]
+Token from 56 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 57 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 58 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 59 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 60 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 61 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 62 to 63 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 63 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 64 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 65 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 66 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 67 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 68 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 69 to 70 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 70 to 71 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 71 to 72 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 72 to 73 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 73 to 74 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 74 to 75 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 75 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 76 to 77 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 77 to 78 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 78 to 79 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 79 to 80 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 80 to 81 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 81 to 82 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 82 to 83 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 83 to 84 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 84 to 85 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 85 to 86 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 16 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 20 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 27 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 31 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 40 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 46 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 47 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts]
+Token from 51 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts, entity.name.type.ts]
+Token from 56 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 57 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 59 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 60 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 61 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 62 to 63 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 63 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 64 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 66 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 67 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 68 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 69 to 70 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 70 to 72 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 72 to 73 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 73 to 74 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 74 to 75 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 75 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 76 to 77 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 77 to 79 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 79 to 80 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 80 to 81 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 81 to 82 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 82 to 83 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 83 to 85 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 85 to 86 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 86 to 87 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 87 to 88 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 88 to 89 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 89 to 90 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 90 to 92 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 92 to 93 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 93 to 94 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 94 to 95 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 95 to 96 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 96 to 97 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 97 to 98 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 17 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 21 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 28 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 32 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 41 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 47 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 48 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 51 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts]
+Token from 52 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, new.expr.ts, entity.name.type.ts]
+Token from 57 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 58 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 60 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 61 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 62 to 63 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 63 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 64 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 65 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 67 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 68 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 69 to 70 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 70 to 71 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 71 to 73 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 73 to 74 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 74 to 75 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 75 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 76 to 77 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 77 to 78 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 78 to 80 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 80 to 81 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 81 to 82 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 82 to 83 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 83 to 84 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 84 to 86 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 86 to 87 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 87 to 88 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 88 to 89 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 89 to 90 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 90 to 91 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 91 to 93 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 93 to 94 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 94 to 95 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 95 to 96 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 96 to 97 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 97 to 98 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 98 to 99 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 16 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, keyword.operator.assignment.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts]
+Token from 19 to 22 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, new.expr.ts]
+Token from 23 to 28 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, new.expr.ts, entity.name.type.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.brace.round.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, punctuation.separator.comma.ts]
+Token from 33 to 34 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, punctuation.separator.comma.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.brace.round.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 15 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, keyword.operator.assignment.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts]
+Token from 18 to 21 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, new.expr.ts]
+Token from 22 to 27 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, new.expr.ts, entity.name.type.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.brace.round.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, punctuation.separator.comma.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts]
+Token from 33 to 34 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, punctuation.separator.comma.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.brace.round.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 16 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, keyword.operator.assignment.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts]
+Token from 19 to 22 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, new.expr.ts]
+Token from 23 to 28 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, new.expr.ts, entity.name.type.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.brace.round.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, punctuation.separator.comma.ts]
+Token from 33 to 34 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, punctuation.separator.comma.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.brace.round.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 21 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, keyword.operator.assignment.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts]
+Token from 24 to 29 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.other.object.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, punctuation.accessor.ts]
+Token from 30 to 35 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.other.property.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 23 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, keyword.operator.assignment.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts]
+Token from 26 to 31 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.other.object.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, punctuation.accessor.ts]
+Token from 32 to 37 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.other.property.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 29 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 12 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, variable.parameter.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts]
+Token from 25 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, storage.type.function.arrow.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.relational.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 33 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.ternary.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.ternary.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 13 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 15 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, support.constant.math.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.accessor.ts]
+Token from 20 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, support.function.math.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 26 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, entity.name.function.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.object.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.accessor.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.property.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, keyword.operator.arithmetic.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 42 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 46 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 13 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 15 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, support.constant.math.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.accessor.ts]
+Token from 20 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, support.function.math.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 26 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, entity.name.function.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.object.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.accessor.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.property.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, keyword.operator.arithmetic.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 42 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 46 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 13 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 15 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, support.constant.math.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.accessor.ts]
+Token from 20 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, support.function.math.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 26 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, entity.name.function.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.object.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.accessor.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.property.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, keyword.operator.arithmetic.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 42 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 8 to 9 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 4 to 5 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 5 with scopes [source.ts, meta.class.ts, storage.type.class.ts]
+Token from 5 to 6 with scopes [source.ts, meta.class.ts]
+Token from 6 to 12 with scopes [source.ts, meta.class.ts, entity.name.type.class.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts]
+Token from 13 to 14 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 18 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 20 to 26 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 16 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 18 to 24 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 13 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 13 to 14 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 15 to 21 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, storage.type.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 16 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, storage.modifier.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 23 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 28 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 36 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 44 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 51 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 52 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 12 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 19 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, new.expr.ts]
+Token from 23 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, new.expr.ts, entity.name.type.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 33 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.arithmetic.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.language.this.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 13 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.assignment.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 23 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 30 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, entity.name.function.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 35 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 42 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, entity.name.function.ts]
+Token from 47 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 48 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 55 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 56 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.language.this.ts]
+Token from 60 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 61 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 64 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 65 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 66 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.language.this.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 13 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.assignment.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 21 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 28 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, entity.name.function.ts]
+Token from 33 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 39 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 46 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, entity.name.function.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 51 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 57 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 58 to 63 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, entity.name.function.ts]
+Token from 63 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 64 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.language.this.ts]
+Token from 68 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 69 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 76 to 77 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 77 to 78 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 78 to 82 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 82 to 83 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 83 to 84 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 84 to 85 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 85 to 86 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.language.this.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 13 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.assignment.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 18 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 25 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, entity.name.function.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 33 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 36 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 43 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, entity.name.function.ts]
+Token from 47 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 48 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 55 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, entity.name.function.ts]
+Token from 60 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 61 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.language.this.ts]
+Token from 65 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 66 to 73 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 73 to 74 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 74 to 75 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 75 to 79 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.language.this.ts]
+Token from 79 to 80 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 80 to 85 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 85 to 86 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 86 to 87 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 87 to 88 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 88 to 89 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 4 to 5 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 9 with scopes [source.ts, meta.class.ts, storage.type.interface.ts]
+Token from 9 to 10 with scopes [source.ts, meta.class.ts]
+Token from 10 to 13 with scopes [source.ts, meta.class.ts, entity.name.type.class.ts]
+Token from 13 to 14 with scopes [source.ts, meta.class.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 9 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 9 to 10 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 11 to 17 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 7 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 7 to 8 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 8 to 9 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 9 to 15 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 9 with scopes [source.ts, meta.class.ts, storage.type.interface.ts]
+Token from 9 to 10 with scopes [source.ts, meta.class.ts]
+Token from 10 to 22 with scopes [source.ts, meta.class.ts, entity.name.type.class.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 9 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 9 to 10 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 11 to 16 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 7 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 7 to 8 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 8 to 9 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 9 to 12 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 8 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 8 to 9 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 9 to 10 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 10 to 16 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, support.type.primitive.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 9 with scopes [source.ts, meta.class.ts, storage.type.interface.ts]
+Token from 9 to 10 with scopes [source.ts, meta.class.ts]
+Token from 10 to 17 with scopes [source.ts, meta.class.ts, entity.name.type.class.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 11 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts]
+Token from 13 to 14 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 14 to 17 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 19 to 25 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 27 to 29 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.return.ts, storage.type.function.arrow.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.return.ts]
+Token from 30 to 35 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.return.ts, entity.name.type.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 12 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 13 to 14 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 15 to 18 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 20 to 26 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 28 to 30 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.return.ts, storage.type.function.arrow.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.return.ts]
+Token from 31 to 36 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.return.ts, entity.name.type.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 11 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts]
+Token from 13 to 14 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 14 to 17 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 19 to 25 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 27 to 29 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.return.ts, storage.type.function.arrow.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.return.ts]
+Token from 30 to 36 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.return.ts, support.type.primitive.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 13 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 13 to 14 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 15 to 21 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, support.type.primitive.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 9 with scopes [source.ts, meta.class.ts, storage.type.interface.ts]
+Token from 9 to 10 with scopes [source.ts, meta.class.ts]
+Token from 10 to 15 with scopes [source.ts, meta.class.ts, entity.name.type.class.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 13 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 13 to 14 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 16 to 19 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 21 to 24 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 26 to 28 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.return.ts, storage.type.function.arrow.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.return.ts]
+Token from 29 to 41 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.return.ts, entity.name.type.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 13 to 16 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 18 to 24 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 26 to 28 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.return.ts, storage.type.function.arrow.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.return.ts]
+Token from 29 to 35 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.return.ts, entity.name.type.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 11 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 13 to 20 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 9 with scopes [source.ts, meta.class.ts, storage.type.interface.ts]
+Token from 9 to 10 with scopes [source.ts, meta.class.ts]
+Token from 10 to 15 with scopes [source.ts, meta.class.ts, entity.name.type.class.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 7 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 7 to 8 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 8 to 9 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 9 to 15 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 9 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 9 to 10 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 11 to 16 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 9 with scopes [source.ts, meta.class.ts, storage.type.interface.ts]
+Token from 9 to 10 with scopes [source.ts, meta.class.ts]
+Token from 10 to 15 with scopes [source.ts, meta.class.ts, entity.name.type.class.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 12 to 17 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.tuple.ts, meta.brace.square.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.tuple.ts, meta.brace.square.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 12 to 17 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.tuple.ts, meta.brace.square.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.tuple.ts, meta.brace.square.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 12 to 18 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 5 with scopes [source.ts, meta.class.ts, storage.type.class.ts]
+Token from 5 to 6 with scopes [source.ts, meta.class.ts]
+Token from 6 to 12 with scopes [source.ts, meta.class.ts, entity.name.type.class.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts]
+Token from 13 to 23 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts]
+Token from 24 to 29 with scopes [source.ts, meta.class.ts, entity.other.inherited-class.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 18 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 20 to 26 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, support.type.primitive.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, storage.type.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 16 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, storage.modifier.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 23 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 31 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 39 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 46 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 47 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, support.type.primitive.ts]
+Token from 53 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 55 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, storage.modifier.ts]
+Token from 61 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 62 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 69 to 70 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 70 to 71 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 71 to 78 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 78 to 79 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 79 to 80 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 80 to 81 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.language.this.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 13 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.assignment.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 23 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 32 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 4 to 5 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 11 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 16 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.return.type.ts, keyword.operator.type.annotation.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.return.type.ts]
+Token from 25 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.return.type.ts, entity.name.type.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.return.type.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 33 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 34 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 41 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 47 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 48 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, entity.name.function.ts]
+Token from 52 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 53 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 59 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 60 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, entity.name.function.ts]
+Token from 65 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 66 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 69 to 70 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 70 to 71 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 71 to 75 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.language.this.ts]
+Token from 75 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 76 to 82 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 82 to 83 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 83 to 84 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 84 to 85 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 85 to 86 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 86 to 87 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 13 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 14 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 19 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 12 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 17 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 24 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 30 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.language.this.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 35 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.property.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 43 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 46 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 47 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, support.variable.property.dom.ts]
+Token from 52 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 53 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 13 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 16 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 23 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 27 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 31 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 35 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, support.variable.property.dom.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 12 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 10 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.conditional.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 13 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 14 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.relational.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 16 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 23 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.language.this.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 28 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.property.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.arithmetic.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 39 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 46 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 50 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 52 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 53 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 54 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 56 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 57 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 58 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.arithmetic.ts]
+Token from 59 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 60 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 61 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 62 to 63 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.arithmetic.ts]
+Token from 63 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 64 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 65 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 66 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, keyword.control.conditional.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 16 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 21 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, keyword.operator.relational.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, keyword.operator.assignment.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 27 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, support.constant.math.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 32 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, support.function.math.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 37 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 8 to 9 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 10 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.conditional.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 12 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 17 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.comparison.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 19 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, constant.language.null.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 8 to 9 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 9 to 10 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 10 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.conditional.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts]
+Token from 21 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 28 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, variable.language.this.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 33 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts]
+Token from 34 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 39 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.readwrite.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts]
+Token from 44 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 48 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 50 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.readwrite.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 55 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 56 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 8 to 9 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 4 to 5 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 5 with scopes [source.ts, meta.class.ts, storage.type.class.ts]
+Token from 5 to 6 with scopes [source.ts, meta.class.ts]
+Token from 6 to 11 with scopes [source.ts, meta.class.ts, entity.name.type.class.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts]
+Token from 12 to 22 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts]
+Token from 23 to 28 with scopes [source.ts, meta.class.ts, entity.other.inherited-class.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 17 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 20 to 23 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 25 to 31 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 33 to 35 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.return.ts, storage.type.function.arrow.ts]
+Token from 35 to 41 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.return.ts, entity.name.type.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts]
+Token from 11 to 20 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 23 to 26 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 28 to 31 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts]
+Token from 33 to 35 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.return.ts, storage.type.function.arrow.ts]
+Token from 35 to 47 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, meta.type.annotation.ts, meta.type.function.return.ts, entity.name.type.ts]
+Token from 47 to 48 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, storage.type.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 16 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 22 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 30 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 38 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, support.type.primitive.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 46 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, storage.modifier.ts]
+Token from 52 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 53 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 60 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 61 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 62 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 69 to 70 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 70 to 71 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 71 to 72 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.language.this.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 13 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.assignment.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 22 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, storage.type.function.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 31 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 36 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts]
+Token from 46 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 52 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts]
+Token from 53 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 57 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 58 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts]
+Token from 59 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.language.this.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 13 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.assignment.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 25 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, storage.type.function.ts]
+Token from 33 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 34 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 39 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.return.type.ts, keyword.operator.type.annotation.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.return.type.ts]
+Token from 45 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.return.type.ts, entity.name.type.ts]
+Token from 57 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.return.type.ts]
+Token from 58 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts]
+Token from 12 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts]
+Token from 16 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts]
+Token from 24 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 31 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 35 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts]
+Token from 41 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 45 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, support.variable.property.dom.ts]
+Token from 48 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts]
+Token from 12 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, keyword.control.conditional.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 16 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, keyword.operator.relational.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts]
+Token from 23 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, constant.language.null.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 13 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts]
+Token from 14 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, keyword.control.conditional.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 20 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 28 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 35 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 39 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 45 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 48 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 49 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, support.variable.property.dom.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 55 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 56 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.arithmetic.ts]
+Token from 57 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 58 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 64 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 65 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 66 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.arithmetic.ts]
+Token from 67 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 68 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 69 to 70 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.arithmetic.ts]
+Token from 70 to 75 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 75 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 76 to 77 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts]
+Token from 25 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 32 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, variable.language.this.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts]
+Token from 38 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 43 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.readwrite.ts]
+Token from 46 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 47 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts]
+Token from 48 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 52 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 53 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 54 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.readwrite.ts]
+Token from 58 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 59 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 60 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts]
+Token from 8 to 9 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 4 to 5 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 6 with scopes [source.ts, meta.namespace.declaration.ts, storage.type.namespace.ts]
+Token from 6 to 7 with scopes [source.ts, meta.namespace.declaration.ts]
+Token from 7 to 15 with scopes [source.ts, meta.namespace.declaration.ts, entity.name.type.module.ts]
+Token from 15 to 16 with scopes [source.ts, meta.namespace.declaration.ts]
+Token from 16 to 17 with scopes [source.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.block.ts]
+Token from 4 to 10 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, keyword.control.export.ts]
+Token from 10 to 11 with scopes [source.ts, meta.block.ts, meta.var.expr.ts]
+Token from 11 to 14 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 14 to 15 with scopes [source.ts, meta.block.ts, meta.var.expr.ts]
+Token from 15 to 20 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 20 to 21 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 21 to 22 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, meta.type.annotation.ts]
+Token from 22 to 29 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 29 to 30 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, meta.type.annotation.ts]
+Token from 30 to 31 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 31 to 32 with scopes [source.ts, meta.block.ts, meta.var.expr.ts]
+Token from 32 to 33 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts]
+Token from 8 to 15 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 15 to 16 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 16 to 17 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 17 to 25 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, storage.type.function.ts]
+Token from 25 to 26 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 26 to 29 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 29 to 30 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 30 to 31 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts]
+Token from 31 to 32 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 32 to 33 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 33 to 39 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 39 to 40 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 40 to 45 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, variable.other.object.ts]
+Token from 45 to 46 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 46 to 51 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, variable.other.property.ts]
+Token from 51 to 52 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 52 to 53 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 53 to 54 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 54 to 55 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 0 to 8 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts]
+Token from 8 to 16 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 16 to 17 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 17 to 18 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 18 to 26 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, storage.type.function.ts]
+Token from 26 to 27 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 27 to 30 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 30 to 31 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 31 to 32 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts]
+Token from 32 to 33 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 33 to 34 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 34 to 40 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 40 to 41 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 41 to 46 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, variable.other.object.ts]
+Token from 46 to 47 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 47 to 51 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, variable.other.property.ts]
+Token from 51 to 52 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 52 to 53 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 53 to 54 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 54 to 55 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 0 to 8 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts]
+Token from 8 to 15 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 15 to 16 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 16 to 17 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 17 to 25 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, storage.type.function.ts]
+Token from 25 to 26 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 26 to 29 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 29 to 30 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 30 to 31 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts]
+Token from 31 to 32 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 32 to 33 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 33 to 39 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 39 to 40 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 40 to 41 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 41 to 42 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 42 to 43 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 43 to 44 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 44 to 45 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 45 to 46 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 46 to 47 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 0 to 8 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts]
+Token from 8 to 17 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 17 to 18 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 18 to 19 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 19 to 22 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 0 to 4 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 4 to 5 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.block.ts]
+Token from 4 to 10 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, keyword.control.export.ts]
+Token from 10 to 11 with scopes [source.ts, meta.block.ts, meta.var.expr.ts]
+Token from 11 to 14 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 14 to 15 with scopes [source.ts, meta.block.ts, meta.var.expr.ts]
+Token from 15 to 27 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 27 to 28 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 28 to 29 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, meta.type.annotation.ts]
+Token from 29 to 36 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 36 to 37 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, meta.type.annotation.ts]
+Token from 37 to 38 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 38 to 39 with scopes [source.ts, meta.block.ts, meta.var.expr.ts]
+Token from 39 to 40 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts]
+Token from 8 to 15 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 15 to 16 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 16 to 17 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 17 to 25 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, storage.type.function.ts]
+Token from 25 to 26 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 26 to 29 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 29 to 30 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 30 to 31 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts]
+Token from 31 to 32 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 12 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 12 to 14 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, keyword.control.conditional.ts]
+Token from 14 to 15 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 15 to 16 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 16 to 17 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 17 to 21 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, support.constant.math.ts]
+Token from 21 to 22 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 22 to 27 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, support.function.math.ts]
+Token from 27 to 28 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 28 to 31 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, variable.other.object.ts]
+Token from 31 to 32 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 32 to 33 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 33 to 34 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 34 to 35 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 35 to 36 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 36 to 37 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 37 to 41 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, support.constant.math.ts]
+Token from 41 to 42 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 42 to 47 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, support.function.math.ts]
+Token from 47 to 48 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 48 to 51 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, variable.other.object.ts]
+Token from 51 to 52 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 52 to 53 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 53 to 54 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 54 to 55 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 55 to 56 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 56 to 57 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 57 to 58 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 58 to 59 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 59 to 60 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 60 to 63 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, keyword.operator.comparison.ts]
+Token from 63 to 64 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 64 to 65 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 65 to 66 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 66 to 67 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 67 to 68 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 16 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 22 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 22 to 23 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts]
+Token from 23 to 28 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, variable.other.object.ts]
+Token from 28 to 29 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 29 to 34 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, variable.other.property.ts]
+Token from 34 to 35 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 13 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 13 to 14 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 14 to 18 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, keyword.control.conditional.ts]
+Token from 18 to 19 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 19 to 20 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 16 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 22 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 22 to 23 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts]
+Token from 23 to 28 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, variable.other.object.ts]
+Token from 28 to 29 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 29 to 34 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, variable.other.property.ts]
+Token from 34 to 35 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 13 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 8 to 9 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 9 to 10 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 0 to 8 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts]
+Token from 8 to 16 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 16 to 17 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 17 to 18 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 18 to 26 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, storage.type.function.ts]
+Token from 26 to 27 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 27 to 30 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 30 to 31 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 31 to 32 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts]
+Token from 32 to 33 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 33 to 34 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 34 to 40 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 40 to 41 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 41 to 46 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, variable.other.object.ts]
+Token from 46 to 47 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 47 to 52 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, variable.other.property.ts]
+Token from 52 to 53 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 53 to 54 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 54 to 55 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 55 to 56 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 0 to 8 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts]
+Token from 8 to 15 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 15 to 16 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 16 to 17 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 17 to 25 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, storage.type.function.ts]
+Token from 25 to 26 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 26 to 29 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 29 to 30 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 30 to 31 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts]
+Token from 31 to 32 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 12 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 12 to 14 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, keyword.control.conditional.ts]
+Token from 14 to 15 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 15 to 16 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 16 to 17 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 17 to 21 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, support.constant.math.ts]
+Token from 21 to 22 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 22 to 27 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, support.function.math.ts]
+Token from 27 to 28 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 28 to 31 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, variable.other.object.ts]
+Token from 31 to 32 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 32 to 33 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 33 to 34 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 34 to 35 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 35 to 36 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 36 to 37 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 37 to 41 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, support.constant.math.ts]
+Token from 41 to 42 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 42 to 47 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, support.function.math.ts]
+Token from 47 to 48 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 48 to 51 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, variable.other.object.ts]
+Token from 51 to 52 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 52 to 53 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 53 to 54 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 54 to 55 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 55 to 56 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 56 to 57 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 57 to 58 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 58 to 59 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 59 to 60 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 60 to 63 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, keyword.operator.comparison.ts]
+Token from 63 to 64 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 64 to 65 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 65 to 66 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 66 to 67 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 67 to 68 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 16 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 22 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 22 to 23 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts]
+Token from 23 to 24 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 24 to 25 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 25 to 26 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 26 to 27 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 13 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 13 to 14 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 14 to 18 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, keyword.control.conditional.ts]
+Token from 18 to 19 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 19 to 20 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 16 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 22 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 22 to 23 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts]
+Token from 23 to 24 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 24 to 25 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 25 to 26 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 26 to 27 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 13 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts]
+Token from 8 to 9 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 9 to 10 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 0 to 8 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts]
+Token from 8 to 17 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 17 to 18 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 18 to 19 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 19 to 22 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 0 to 4 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 4 to 5 with scopes [source.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 5 with scopes [source.ts, meta.class.ts, storage.type.class.ts]
+Token from 5 to 6 with scopes [source.ts, meta.class.ts]
+Token from 6 to 15 with scopes [source.ts, meta.class.ts, entity.name.type.class.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 11 with scopes [source.ts, meta.class.ts, storage.modifier.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts]
+Token from 12 to 20 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, variable.object.property.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, keyword.operator.assignment.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.field.declaration.ts, constant.numeric.decimal.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, punctuation.terminator.statement.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, storage.modifier.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 12 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 26 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 31 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 36 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 43 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 48 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 12 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.arithmetic.ts]
+Token from 23 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.language.infinity.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 12 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, meta.type.annotation.ts]
+Token from 26 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, meta.type.annotation.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 41 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.language.undefined.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.loop.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 13 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 19 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.in.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 22 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 28 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 16 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 24 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 30 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.property.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.array.literal.ts, meta.brace.square.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.array.literal.ts, variable.other.readwrite.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.array.literal.ts, meta.brace.square.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 40 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 50 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 53 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, keyword.control.conditional.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 16 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 22 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, keyword.operator.comparison.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 25 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, constant.language.null.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 30 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, keyword.operator.logical.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 33 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, variable.other.object.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 39 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, variable.other.property.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, keyword.operator.relational.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 46 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 53 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 55 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, keyword.operator.assignment.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 31 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, keyword.operator.assignment.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 26 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.object.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 32 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.property.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 8 to 9 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 15 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 4 to 5 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, storage.modifier.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 12 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 20 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 25 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 30 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 37 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 12 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 20 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.language.this.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 25 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 39 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 44 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 10 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.conditional.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 12 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 18 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.comparison.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 21 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, constant.language.null.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 19 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, variable.other.object.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 25 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, variable.other.property.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 8 to 9 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 9 to 10 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 10 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.conditional.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 19 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, constant.language.undefined.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 8 to 9 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 4 to 5 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, storage.modifier.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 12 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 21 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 26 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 31 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 38 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 45 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 51 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 52 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, support.type.primitive.ts]
+Token from 58 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 59 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.return.type.ts, keyword.operator.type.annotation.ts]
+Token from 60 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.return.type.ts]
+Token from 61 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.return.type.ts, entity.name.type.ts]
+Token from 66 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.return.type.ts]
+Token from 67 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 12 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 20 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.language.this.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 25 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 39 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 44 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 10 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.conditional.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 12 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 18 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.comparison.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 22 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, constant.language.undefined.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 33 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 19 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, variable.other.object.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 25 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 8 to 9 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 9 to 10 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 10 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.conditional.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 19 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, variable.language.this.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 24 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, entity.name.function.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 30 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 37 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 44 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 8 to 9 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 4 to 5 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, storage.modifier.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 12 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 18 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 25 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 39 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 46 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 51 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 52 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 53 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 58 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 59 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 60 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, support.type.primitive.ts]
+Token from 66 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 67 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 68 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 13 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 16 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 22 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.property.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 26 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, support.variable.property.dom.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 12 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 18 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 25 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 30 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 37 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 43 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 48 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 49 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.property.ts]
+Token from 53 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 55 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 56 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 57 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 58 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 59 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 64 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 65 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.property.ts]
+Token from 68 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 69 to 74 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, support.variable.property.dom.ts]
+Token from 74 to 75 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 75 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 12 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 21 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 27 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.property.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 33 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 40 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 12 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 25 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 32 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 41 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 47 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 48 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 53 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 55 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 56 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 57 to 63 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 63 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 64 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 69 to 70 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 70 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 76 to 77 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 77 to 80 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 80 to 81 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 81 to 87 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 87 to 88 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 88 to 89 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 89 to 90 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 90 to 91 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 91 to 92 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 92 to 93 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 93 to 99 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 99 to 100 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 100 to 101 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 101 to 102 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 102 to 103 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 12 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 27 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 33 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 38 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 44 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, support.variable.property.dom.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 0 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 38 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.language.this.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 43 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 58 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 59 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 64 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 65 to 70 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.property.ts]
+Token from 70 to 71 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 71 to 72 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 72 to 75 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 75 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 76 to 77 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 77 to 83 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 83 to 84 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 84 to 85 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 85 to 95 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 95 to 96 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 96 to 97 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 97 to 102 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 102 to 103 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 103 to 104 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 104 to 105 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 12 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 30 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 36 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.relational.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 39 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.language.this.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 44 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.property.ts]
+Token from 52 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 53 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.ternary.ts]
+Token from 55 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 56 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 61 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 62 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.property.ts]
+Token from 66 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 67 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.ternary.ts]
+Token from 68 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 69 to 73 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.language.this.ts]
+Token from 73 to 74 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 74 to 92 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 92 to 93 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 93 to 98 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 98 to 99 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 99 to 104 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.property.ts]
+Token from 104 to 105 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 105 to 106 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 106 to 109 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 109 to 110 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 110 to 111 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 111 to 117 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 117 to 118 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 118 to 119 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 119 to 129 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 129 to 130 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 130 to 131 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 131 to 136 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 136 to 137 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 137 to 138 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 138 to 143 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 143 to 144 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 144 to 145 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 15 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 21 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, entity.name.function.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 26 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 40 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 55 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 4 to 5 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, storage.modifier.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 12 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 31 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 38 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 45 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 48 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 50 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 56 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 57 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 58 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 64 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 65 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 66 to 72 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 72 to 73 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 73 to 74 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 74 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 76 to 77 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 77 to 78 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 78 to 84 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 84 to 85 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 85 to 86 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 86 to 91 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 91 to 92 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 92 to 93 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 93 to 98 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 98 to 99 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 99 to 100 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 100 to 105 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 105 to 106 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 106 to 107 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 107 to 113 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, support.type.primitive.ts]
+Token from 113 to 114 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 114 to 115 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 115 to 116 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 15 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 21 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, entity.name.function.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 27 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 33 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.property.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 41 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, entity.name.function.ts]
+Token from 48 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 49 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 52 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 53 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 55 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.language.this.ts]
+Token from 59 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 60 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, entity.name.function.ts]
+Token from 68 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 69 to 70 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 70 to 71 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts]
+Token from 71 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 76 to 77 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 77 to 78 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 78 to 81 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.readwrite.ts]
+Token from 81 to 82 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 82 to 83 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts]
+Token from 83 to 86 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 86 to 87 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 87 to 88 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 88 to 90 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.readwrite.ts]
+Token from 90 to 91 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 91 to 92 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 92 to 93 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 93 to 94 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 94 to 99 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 99 to 100 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 100 to 101 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 101 to 106 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 106 to 107 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 107 to 108 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 108 to 109 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 109 to 110 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 110 to 111 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 111 to 112 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 112 to 113 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 4 to 5 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, storage.modifier.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 12 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 28 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 33 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 35 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 42 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 46 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 47 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 53 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 55 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 59 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 60 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 61 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 67 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 68 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 69 to 71 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 71 to 72 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 72 to 73 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 73 to 79 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 79 to 80 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 80 to 81 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 81 to 86 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 86 to 87 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, keyword.operator.type.annotation.ts]
+Token from 87 to 88 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts]
+Token from 88 to 93 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, meta.type.annotation.ts, entity.name.type.ts]
+Token from 93 to 94 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 94 to 95 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 95 to 96 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 12 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 24 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.parameters.ts]
+Token from 29 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts]
+Token from 36 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, storage.type.function.arrow.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts]
+Token from 12 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 16 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 23 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 30 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 36 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 42 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, variable.other.property.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 46 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 47 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 51 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts]
+Token from 12 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 16 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 24 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 31 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 36 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts]
+Token from 12 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 16 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 28 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, variable.language.this.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 33 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts]
+Token from 43 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 48 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 50 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.readwrite.ts]
+Token from 53 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts]
+Token from 55 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 58 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 59 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 60 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.readwrite.ts]
+Token from 65 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 66 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 67 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 68 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 69 to 74 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 74 to 75 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 75 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts]
+Token from 12 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 16 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 30 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 40 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.comparison.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 44 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, constant.language.undefined.ts]
+Token from 53 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 55 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.ternary.ts]
+Token from 56 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 57 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, constant.language.boolean.false.ts]
+Token from 62 to 63 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 63 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.ternary.ts]
+Token from 64 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 65 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 66 to 75 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 75 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 76 to 78 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.relational.ts]
+Token from 78 to 79 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 79 to 85 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 85 to 86 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 86 to 89 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 89 to 90 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 90 to 94 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 94 to 95 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 95 to 96 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 96 to 97 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts]
+Token from 12 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, keyword.control.conditional.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.brace.round.ts]
+Token from 16 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.brace.round.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts]
+Token from 23 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 13 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts]
+Token from 14 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, keyword.control.conditional.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 20 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 28 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 35 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 39 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 46 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 51 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 20 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 30 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.relational.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.ternary.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 43 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 48 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 49 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 55 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 60 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 61 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 62 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 67 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 68 to 73 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, support.variable.property.dom.ts]
+Token from 73 to 74 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 0 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.ternary.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 44 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 50 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.property.ts]
+Token from 62 to 63 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 20 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 31 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 38 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 42 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 47 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 48 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 49 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 55 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 56 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 60 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 61 to 63 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 63 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 64 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 65 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 20 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 30 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.relational.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.ternary.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 46 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 51 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 52 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 57 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 58 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, support.constant.math.ts]
+Token from 62 to 63 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 63 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, support.function.math.ts]
+Token from 66 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 67 to 75 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 75 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 76 to 77 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 77 to 82 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 82 to 83 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 83 to 90 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.property.ts]
+Token from 90 to 91 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 91 to 100 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.property.ts]
+Token from 100 to 101 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 101 to 102 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 102 to 103 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 103 to 108 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 108 to 109 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 109 to 114 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, support.variable.property.dom.ts]
+Token from 114 to 115 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 0 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.ternary.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 44 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 50 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.property.ts]
+Token from 62 to 63 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts]
+Token from 23 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, variable.other.object.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 29 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, entity.name.function.ts]
+Token from 33 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 34 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts]
+Token from 39 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, variable.other.object.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 45 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, entity.name.function.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 50 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, variable.other.object.ts]
+Token from 55 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 56 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, entity.name.function.ts]
+Token from 61 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 62 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, variable.other.object.ts]
+Token from 67 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 68 to 75 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, variable.other.object.property.ts]
+Token from 75 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 76 to 83 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, entity.name.function.ts]
+Token from 83 to 84 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 84 to 87 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 87 to 88 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 88 to 89 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 89 to 90 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts]
+Token from 90 to 96 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 96 to 97 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 97 to 98 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 0 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts]
+Token from 50 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, variable.other.object.ts]
+Token from 55 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 56 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, entity.name.function.ts]
+Token from 61 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 62 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, variable.other.object.ts]
+Token from 67 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 68 to 75 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, variable.other.object.property.ts]
+Token from 75 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 76 to 84 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, entity.name.function.ts]
+Token from 84 to 85 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 85 to 88 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 88 to 89 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 89 to 90 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 90 to 91 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts]
+Token from 91 to 97 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 97 to 98 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 98 to 99 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 99 to 100 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 100 to 101 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts]
+Token from 8 to 9 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 14 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 14 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 15 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 21 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.property.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 28 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, entity.name.function.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 35 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 45 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.object.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 51 to 63 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.property.ts]
+Token from 63 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 64 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 4 to 5 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts]
+Token from 4 to 10 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, entity.name.function.ts]
+Token from 10 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 11 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 18 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 23 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts]
+Token from 36 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 48 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 12 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.parameters.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.parameters.ts, punctuation.separator.parameter.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.parameters.ts]
+Token from 30 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.parameters.ts, variable.parameter.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts]
+Token from 38 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, storage.type.function.arrow.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts]
+Token from 12 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 16 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, variable.parameter.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts]
+Token from 30 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, storage.type.function.arrow.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 33 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.arithmetic.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 38 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.arithmetic.ts]
+Token from 51 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 52 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 53 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 55 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 56 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 57 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 58 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.arithmetic.ts]
+Token from 59 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 60 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 61 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 62 to 63 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 63 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 64 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.arithmetic.ts]
+Token from 65 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 66 to 77 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 77 to 78 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts]
+Token from 12 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 16 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, variable.parameter.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts]
+Token from 30 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, storage.type.function.arrow.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts]
+Token from 33 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.arithmetic.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.arithmetic.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 41 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 53 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.arithmetic.ts]
+Token from 55 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 56 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 57 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 58 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 59 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 60 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 61 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 62 to 63 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.arithmetic.ts]
+Token from 63 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 64 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 65 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 66 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 67 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 68 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.arithmetic.ts]
+Token from 69 to 70 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts]
+Token from 70 to 82 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 82 to 83 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts]
+Token from 12 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts]
+Token from 19 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, variable.other.object.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 26 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, entity.name.function.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.brace.round.ts]
+Token from 31 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, variable.other.object.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 38 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, entity.name.function.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.brace.round.ts]
+Token from 43 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, variable.other.object.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 50 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, variable.other.property.ts]
+Token from 57 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 58 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts]
+Token from 59 to 65 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, variable.other.object.ts]
+Token from 65 to 66 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 66 to 70 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, entity.name.function.ts]
+Token from 70 to 71 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.brace.round.ts]
+Token from 71 to 77 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, variable.other.object.ts]
+Token from 77 to 78 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 78 to 83 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, entity.name.function.ts]
+Token from 83 to 84 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.brace.round.ts]
+Token from 84 to 93 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, entity.name.function.ts]
+Token from 93 to 94 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.brace.round.ts]
+Token from 94 to 95 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 95 to 96 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.brace.round.ts]
+Token from 96 to 97 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 97 to 98 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts]
+Token from 98 to 104 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, variable.other.object.ts]
+Token from 104 to 105 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 105 to 110 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 110 to 111 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.brace.round.ts]
+Token from 111 to 112 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 112 to 113 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts]
+Token from 113 to 119 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, variable.other.object.ts]
+Token from 119 to 120 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 120 to 125 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, entity.name.function.ts]
+Token from 125 to 126 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.brace.round.ts]
+Token from 126 to 135 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, entity.name.function.ts]
+Token from 135 to 136 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.brace.round.ts]
+Token from 136 to 137 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 137 to 138 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.brace.round.ts]
+Token from 138 to 139 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 139 to 140 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts]
+Token from 140 to 146 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, variable.other.object.ts]
+Token from 146 to 147 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 147 to 149 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, variable.other.property.ts]
+Token from 149 to 150 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.brace.round.ts]
+Token from 150 to 151 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.brace.round.ts]
+Token from 151 to 152 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.brace.round.ts]
+Token from 152 to 153 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, meta.brace.round.ts]
+Token from 153 to 154 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts]
+Token from 8 to 9 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.arrow.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 8 to 11 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.control.loop.ts]
+Token from 11 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 13 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 17 to 18 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 18 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.relational.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 28 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 43 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, keyword.operator.increment.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.brace.round.ts]
+Token from 46 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 47 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 15 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, keyword.control.loop.ts]
+Token from 15 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 17 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 17 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 24 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, keyword.operator.relational.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 32 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 46 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, keyword.operator.increment.ts]
+Token from 48 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 20 to 25 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 25 to 26 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 26 to 27 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 27 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 28 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.language.this.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 33 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts]
+Token from 44 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 51 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.object.ts]
+Token from 56 to 57 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.accessor.ts]
+Token from 57 to 63 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.object.property.ts]
+Token from 63 to 64 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.accessor.ts]
+Token from 64 to 67 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.property.ts]
+Token from 67 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 68 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts]
+Token from 69 to 72 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 72 to 73 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 73 to 74 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 74 to 82 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, entity.name.function.ts]
+Token from 82 to 83 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 83 to 84 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.readwrite.ts]
+Token from 84 to 85 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 85 to 86 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 86 to 87 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.readwrite.ts]
+Token from 87 to 88 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 88 to 89 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 89 to 94 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.object.ts]
+Token from 94 to 95 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.accessor.ts]
+Token from 95 to 101 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, variable.other.property.ts]
+Token from 101 to 102 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 102 to 103 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 103 to 104 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 104 to 105 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 105 to 106 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 106 to 111 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 111 to 112 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.separator.comma.ts]
+Token from 112 to 113 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 113 to 114 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, constant.numeric.decimal.ts]
+Token from 114 to 115 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 115 to 116 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 20 to 21 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 21 to 22 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 22 to 23 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 23 to 24 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts]
+Token from 24 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 30 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, entity.name.function.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 45 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, variable.other.readwrite.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 51 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.object.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 20 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.property.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, keyword.operator.assignment.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, string.quoted.double.ts, punctuation.definition.string.begin.ts]
+Token from 33 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, string.quoted.double.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, string.quoted.double.ts, punctuation.definition.string.end.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 41 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, support.class.builtin.ts]
+Token from 47 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 48 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.object.ts]
+Token from 49 to 50 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 50 to 51 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.property.ts]
+Token from 51 to 52 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 52 to 53 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 53 to 54 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 54 to 55 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 55 to 56 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, string.quoted.double.ts, punctuation.definition.string.begin.ts]
+Token from 56 to 58 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, string.quoted.double.ts]
+Token from 58 to 59 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, string.quoted.double.ts, punctuation.definition.string.end.ts]
+Token from 59 to 60 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 60 to 61 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 61 to 62 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 62 to 68 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, support.class.builtin.ts]
+Token from 68 to 69 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 69 to 70 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.object.ts]
+Token from 70 to 71 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 71 to 72 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.property.ts]
+Token from 72 to 73 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 73 to 74 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 74 to 75 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 75 to 76 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 76 to 77 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, string.quoted.double.ts, punctuation.definition.string.begin.ts]
+Token from 77 to 79 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, string.quoted.double.ts]
+Token from 79 to 80 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, string.quoted.double.ts, punctuation.definition.string.end.ts]
+Token from 80 to 81 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 81 to 82 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 82 to 83 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 83 to 89 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, support.class.builtin.ts]
+Token from 89 to 90 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 90 to 91 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.object.ts]
+Token from 91 to 92 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 92 to 93 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.property.ts]
+Token from 93 to 94 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 94 to 95 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 95 to 96 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 96 to 97 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 97 to 98 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, string.quoted.double.ts, punctuation.definition.string.begin.ts]
+Token from 98 to 99 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, string.quoted.double.ts]
+Token from 99 to 100 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, string.quoted.double.ts, punctuation.definition.string.end.ts]
+Token from 100 to 101 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 16 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 16 to 19 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.object.ts]
+Token from 19 to 20 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 20 to 28 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, entity.name.function.ts]
+Token from 28 to 29 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 29 to 30 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 30 to 31 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 31 to 32 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 32 to 33 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 33 to 34 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 34 to 35 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 35 to 36 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 36 to 37 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 37 to 38 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 38 to 39 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 39 to 40 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 40 to 41 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 41 to 42 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 42 to 43 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 43 to 44 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 44 to 45 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, keyword.operator.arithmetic.ts]
+Token from 45 to 46 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 46 to 47 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 47 to 48 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, meta.brace.round.ts]
+Token from 48 to 49 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 12 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts]
+Token from 12 to 13 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts]
+Token from 8 to 9 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts]
+Token from 4 to 5 with scopes [source.ts, meta.class.ts, meta.method.declaration.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts, meta.class.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 8 with scopes [source.ts, meta.function.ts, storage.type.function.ts]
+Token from 8 to 9 with scopes [source.ts, meta.function.ts]
+Token from 9 to 21 with scopes [source.ts, meta.function.ts, entity.name.function.ts]
+Token from 21 to 22 with scopes [source.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 22 to 23 with scopes [source.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 23 to 24 with scopes [source.ts, meta.function.ts, meta.return.type.ts, keyword.operator.type.annotation.ts]
+Token from 24 to 25 with scopes [source.ts, meta.function.ts, meta.return.type.ts]
+Token from 25 to 30 with scopes [source.ts, meta.function.ts, meta.return.type.ts, entity.name.type.ts]
+Token from 30 to 31 with scopes [source.ts, meta.function.ts, meta.return.type.ts]
+Token from 31 to 32 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.function.ts, meta.block.ts]
+Token from 4 to 10 with scopes [source.ts, meta.function.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 10 to 11 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts]
+Token from 11 to 12 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 0 to 8 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts]
+Token from 8 to 14 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 14 to 15 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 15 to 16 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 16 to 17 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.brace.square.ts]
+Token from 17 to 20 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 20 to 21 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, new.expr.ts]
+Token from 21 to 26 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, new.expr.ts, entity.name.type.ts]
+Token from 26 to 27 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.brace.round.ts]
+Token from 27 to 30 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 30 to 31 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, new.expr.ts]
+Token from 31 to 37 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, new.expr.ts, entity.name.type.ts]
+Token from 37 to 38 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.brace.round.ts]
+Token from 38 to 39 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 39 to 40 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 40 to 41 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 41 to 42 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.separator.comma.ts]
+Token from 42 to 43 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts]
+Token from 43 to 44 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 44 to 45 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 45 to 46 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 46 to 47 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.separator.comma.ts]
+Token from 47 to 48 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts]
+Token from 48 to 49 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 49 to 50 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 50 to 51 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 51 to 52 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.brace.round.ts]
+Token from 52 to 53 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.separator.comma.ts]
+Token from 53 to 54 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts]
+Token from 54 to 55 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 55 to 56 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 56 to 57 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 57 to 58 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.separator.comma.ts]
+Token from 58 to 59 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts]
+Token from 59 to 67 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, variable.other.object.ts]
+Token from 67 to 68 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.accessor.ts]
+Token from 68 to 80 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, variable.other.property.ts]
+Token from 80 to 81 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.brace.round.ts]
+Token from 81 to 82 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.separator.comma.ts]
+Token from 0 to 17 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts]
+Token from 17 to 20 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 20 to 21 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, new.expr.ts]
+Token from 21 to 27 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, new.expr.ts, entity.name.type.ts]
+Token from 27 to 28 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.brace.round.ts]
+Token from 28 to 31 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 31 to 32 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, new.expr.ts]
+Token from 32 to 38 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, new.expr.ts, entity.name.type.ts]
+Token from 38 to 39 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.brace.round.ts]
+Token from 39 to 40 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 40 to 41 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 41 to 42 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 42 to 43 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.separator.comma.ts]
+Token from 43 to 44 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts]
+Token from 44 to 45 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 45 to 46 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 46 to 47 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 47 to 48 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.separator.comma.ts]
+Token from 48 to 49 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts]
+Token from 49 to 50 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, keyword.operator.arithmetic.ts]
+Token from 50 to 51 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 51 to 52 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 52 to 54 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 54 to 55 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.brace.round.ts]
+Token from 55 to 56 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.separator.comma.ts]
+Token from 56 to 57 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts]
+Token from 57 to 58 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 58 to 59 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 59 to 60 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 60 to 61 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.separator.comma.ts]
+Token from 61 to 62 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts]
+Token from 62 to 70 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, variable.other.object.ts]
+Token from 70 to 71 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.accessor.ts]
+Token from 71 to 76 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, variable.other.property.ts]
+Token from 76 to 77 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.brace.round.ts]
+Token from 77 to 78 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.separator.comma.ts]
+Token from 0 to 17 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts]
+Token from 17 to 20 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 20 to 21 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, new.expr.ts]
+Token from 21 to 27 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, new.expr.ts, entity.name.type.ts]
+Token from 27 to 28 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.brace.round.ts]
+Token from 28 to 31 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 31 to 32 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, new.expr.ts]
+Token from 32 to 38 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, new.expr.ts, entity.name.type.ts]
+Token from 38 to 39 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.brace.round.ts]
+Token from 39 to 40 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, keyword.operator.arithmetic.ts]
+Token from 40 to 41 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 41 to 42 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 42 to 43 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 43 to 44 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.separator.comma.ts]
+Token from 44 to 45 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts]
+Token from 45 to 46 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 46 to 47 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 47 to 48 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 48 to 49 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.separator.comma.ts]
+Token from 49 to 50 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts]
+Token from 50 to 51 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 51 to 52 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 52 to 53 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 53 to 54 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.brace.round.ts]
+Token from 54 to 55 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.separator.comma.ts]
+Token from 55 to 56 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts]
+Token from 56 to 57 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 57 to 58 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 58 to 59 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, constant.numeric.decimal.ts]
+Token from 59 to 60 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.separator.comma.ts]
+Token from 60 to 61 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts]
+Token from 61 to 69 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, variable.other.object.ts]
+Token from 69 to 70 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.accessor.ts]
+Token from 70 to 75 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, variable.other.property.ts]
+Token from 75 to 76 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.brace.round.ts]
+Token from 76 to 77 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.brace.square.ts]
+Token from 77 to 78 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 0 to 8 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts]
+Token from 8 to 14 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 14 to 15 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 15 to 16 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 16 to 17 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.brace.square.ts]
+Token from 17 to 18 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 18 to 19 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts]
+Token from 19 to 22 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 22 to 23 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 23 to 24 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 24 to 27 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 27 to 28 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts]
+Token from 28 to 34 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, entity.name.type.ts]
+Token from 34 to 35 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 35 to 36 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, keyword.operator.arithmetic.ts]
+Token from 36 to 37 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 37 to 38 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 38 to 39 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 39 to 40 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 40 to 41 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 41 to 42 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 42 to 43 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 43 to 44 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 44 to 45 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 45 to 46 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 46 to 47 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 47 to 48 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 48 to 49 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 49 to 50 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 50 to 51 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 51 to 52 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts]
+Token from 52 to 57 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 57 to 58 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 58 to 59 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 59 to 62 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 62 to 63 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts]
+Token from 63 to 68 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, entity.name.type.ts]
+Token from 68 to 69 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 69 to 70 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 70 to 71 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 71 to 73 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 73 to 74 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 74 to 75 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 75 to 76 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 76 to 77 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 77 to 79 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 79 to 80 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 80 to 81 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 81 to 82 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 82 to 83 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 83 to 85 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 85 to 86 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 86 to 87 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 87 to 88 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 88 to 89 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.separator.comma.ts]
+Token from 0 to 17 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts]
+Token from 17 to 18 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 18 to 19 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts]
+Token from 19 to 22 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 22 to 23 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 23 to 24 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 24 to 27 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 27 to 28 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts]
+Token from 28 to 34 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, entity.name.type.ts]
+Token from 34 to 35 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 35 to 36 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 36 to 37 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 37 to 38 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 38 to 39 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 39 to 40 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 40 to 41 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 41 to 42 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 42 to 43 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 43 to 44 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 44 to 45 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 45 to 46 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 46 to 47 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 47 to 48 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 48 to 49 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 49 to 50 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 50 to 51 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts]
+Token from 51 to 56 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 56 to 57 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 57 to 58 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 58 to 61 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 61 to 62 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts]
+Token from 62 to 67 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, entity.name.type.ts]
+Token from 67 to 68 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 68 to 69 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 69 to 70 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 70 to 72 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 72 to 73 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 73 to 74 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 74 to 75 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 75 to 76 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 76 to 78 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 78 to 79 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 79 to 80 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 80 to 81 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 81 to 82 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 82 to 84 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 84 to 85 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 85 to 86 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 86 to 87 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 87 to 88 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.separator.comma.ts]
+Token from 0 to 17 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts]
+Token from 17 to 18 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 18 to 19 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts]
+Token from 19 to 22 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 22 to 23 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 23 to 24 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 24 to 27 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 27 to 28 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts]
+Token from 28 to 34 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, entity.name.type.ts]
+Token from 34 to 35 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 35 to 36 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 36 to 37 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 37 to 38 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 38 to 39 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 39 to 40 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 40 to 41 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 41 to 42 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 42 to 43 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 43 to 44 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 44 to 45 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 45 to 46 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, keyword.operator.arithmetic.ts]
+Token from 46 to 47 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 47 to 48 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 48 to 49 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 49 to 50 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 50 to 51 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 51 to 52 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts]
+Token from 52 to 57 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 57 to 58 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 58 to 59 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 59 to 62 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 62 to 63 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts]
+Token from 63 to 68 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, entity.name.type.ts]
+Token from 68 to 69 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 69 to 70 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 70 to 71 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 71 to 73 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 73 to 74 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 74 to 75 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 75 to 76 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 76 to 77 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 77 to 79 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 79 to 80 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 80 to 81 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 81 to 82 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 82 to 83 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 83 to 86 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 86 to 87 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 87 to 88 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 88 to 89 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 89 to 90 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, punctuation.separator.comma.ts]
+Token from 0 to 17 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts]
+Token from 17 to 18 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 18 to 19 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts]
+Token from 19 to 22 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 22 to 23 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 23 to 24 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 24 to 27 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 27 to 28 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts]
+Token from 28 to 34 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, entity.name.type.ts]
+Token from 34 to 35 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 35 to 36 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 36 to 37 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 37 to 38 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 38 to 39 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 39 to 40 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 40 to 41 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 41 to 42 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 42 to 43 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 43 to 44 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 44 to 45 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 45 to 46 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 46 to 47 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 47 to 48 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 48 to 49 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 49 to 50 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 50 to 51 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts]
+Token from 51 to 56 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 56 to 57 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 57 to 58 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 58 to 61 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 61 to 62 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts]
+Token from 62 to 67 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, entity.name.type.ts]
+Token from 67 to 68 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 68 to 69 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 69 to 70 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 70 to 72 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 72 to 73 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 73 to 74 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 74 to 75 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 75 to 76 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 76 to 78 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 78 to 79 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 79 to 80 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 80 to 81 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 81 to 82 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 82 to 84 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 84 to 85 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 85 to 86 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 86 to 87 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 87 to 88 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.array.literal.ts, meta.brace.square.ts]
+Token from 88 to 89 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, punctuation.separator.comma.ts]
+Token from 0 to 8 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts]
+Token from 8 to 14 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts]
+Token from 14 to 15 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.object-literal.key.ts, punctuation.separator.key-value.ts]
+Token from 15 to 16 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 16 to 19 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 19 to 20 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts]
+Token from 20 to 26 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, entity.name.type.ts]
+Token from 26 to 27 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 27 to 30 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 30 to 31 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts]
+Token from 31 to 37 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, entity.name.type.ts]
+Token from 37 to 38 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 38 to 39 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 39 to 40 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 40 to 41 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 41 to 42 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 42 to 43 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 43 to 44 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 44 to 45 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 45 to 46 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 46 to 47 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 47 to 48 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 48 to 49 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 49 to 50 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 50 to 51 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 51 to 52 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 52 to 53 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 53 to 54 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 54 to 57 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 57 to 58 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts]
+Token from 58 to 64 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, new.expr.ts, entity.name.type.ts]
+Token from 64 to 65 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 65 to 66 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, keyword.operator.arithmetic.ts]
+Token from 66 to 67 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 67 to 68 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 68 to 69 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 69 to 70 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 70 to 71 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 71 to 72 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 72 to 73 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 73 to 74 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 74 to 75 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, punctuation.separator.comma.ts]
+Token from 75 to 76 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 76 to 77 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 77 to 78 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts, meta.delimiter.decimal.period.ts]
+Token from 78 to 79 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, constant.numeric.decimal.ts]
+Token from 79 to 80 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 80 to 81 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts, meta.brace.round.ts]
+Token from 0 to 4 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, meta.object.member.ts]
+Token from 4 to 5 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.object-literal.ts, punctuation.definition.block.ts]
+Token from 5 to 6 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 1 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 8 with scopes [source.ts, meta.function.ts, storage.type.function.ts]
+Token from 8 to 9 with scopes [source.ts, meta.function.ts]
+Token from 9 to 13 with scopes [source.ts, meta.function.ts, entity.name.function.ts]
+Token from 13 to 14 with scopes [source.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.begin.ts]
+Token from 14 to 15 with scopes [source.ts, meta.function.ts, meta.parameters.ts, punctuation.definition.parameters.end.ts]
+Token from 15 to 16 with scopes [source.ts, meta.function.ts]
+Token from 16 to 17 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 4 with scopes [source.ts, meta.function.ts, meta.block.ts]
+Token from 4 to 7 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 7 to 8 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts]
+Token from 8 to 12 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 12 to 13 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 13 to 14 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 14 to 15 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts]
+Token from 15 to 23 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, support.variable.dom.ts]
+Token from 23 to 24 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 24 to 37 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, support.function.dom.ts]
+Token from 37 to 38 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 38 to 39 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, string.quoted.double.ts, punctuation.definition.string.begin.ts]
+Token from 39 to 45 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, string.quoted.double.ts]
+Token from 45 to 46 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, string.quoted.double.ts, punctuation.definition.string.end.ts]
+Token from 46 to 47 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 47 to 48 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.function.ts, meta.block.ts]
+Token from 4 to 8 with scopes [source.ts, meta.function.ts, meta.block.ts, variable.other.object.ts]
+Token from 8 to 9 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 9 to 14 with scopes [source.ts, meta.function.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 14 to 15 with scopes [source.ts, meta.function.ts, meta.block.ts]
+Token from 15 to 16 with scopes [source.ts, meta.function.ts, meta.block.ts, keyword.operator.assignment.ts]
+Token from 16 to 17 with scopes [source.ts, meta.function.ts, meta.block.ts]
+Token from 17 to 20 with scopes [source.ts, meta.function.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 20 to 21 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.function.ts, meta.block.ts]
+Token from 4 to 8 with scopes [source.ts, meta.function.ts, meta.block.ts, variable.other.object.ts]
+Token from 8 to 9 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 9 to 15 with scopes [source.ts, meta.function.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 15 to 16 with scopes [source.ts, meta.function.ts, meta.block.ts]
+Token from 16 to 17 with scopes [source.ts, meta.function.ts, meta.block.ts, keyword.operator.assignment.ts]
+Token from 17 to 18 with scopes [source.ts, meta.function.ts, meta.block.ts]
+Token from 18 to 21 with scopes [source.ts, meta.function.ts, meta.block.ts, constant.numeric.decimal.ts]
+Token from 21 to 22 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.function.ts, meta.block.ts]
+Token from 4 to 12 with scopes [source.ts, meta.function.ts, meta.block.ts, support.variable.dom.ts]
+Token from 12 to 13 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 13 to 17 with scopes [source.ts, meta.function.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 17 to 18 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 18 to 29 with scopes [source.ts, meta.function.ts, meta.block.ts, support.function.dom.ts]
+Token from 29 to 30 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 30 to 34 with scopes [source.ts, meta.function.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 34 to 35 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 35 to 36 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.function.ts, meta.block.ts]
+Token from 4 to 7 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 7 to 8 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts]
+Token from 8 to 11 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 11 to 12 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 12 to 13 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 13 to 14 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts]
+Token from 14 to 18 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, variable.other.object.ts]
+Token from 18 to 19 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, punctuation.accessor.ts]
+Token from 19 to 29 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, support.function.dom.ts]
+Token from 29 to 30 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 30 to 31 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, string.quoted.double.ts, punctuation.definition.string.begin.ts]
+Token from 31 to 33 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, string.quoted.double.ts]
+Token from 33 to 34 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, string.quoted.double.ts, punctuation.definition.string.end.ts]
+Token from 34 to 35 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 35 to 36 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.function.ts, meta.block.ts]
+Token from 4 to 7 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, storage.type.ts]
+Token from 7 to 8 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts]
+Token from 8 to 17 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts, variable.other.readwrite.ts]
+Token from 17 to 18 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, meta.var-single-variable.expr.ts]
+Token from 18 to 19 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, keyword.operator.assignment.ts]
+Token from 19 to 20 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts]
+Token from 20 to 23 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, new.expr.ts, keyword.operator.new.ts]
+Token from 23 to 24 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, new.expr.ts]
+Token from 24 to 33 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, new.expr.ts, entity.name.type.ts]
+Token from 33 to 34 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 34 to 35 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.var.expr.ts, meta.brace.round.ts]
+Token from 35 to 36 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 4 with scopes [source.ts, meta.function.ts, meta.block.ts]
+Token from 4 to 10 with scopes [source.ts, meta.function.ts, meta.block.ts, keyword.control.flow.ts]
+Token from 10 to 11 with scopes [source.ts, meta.function.ts, meta.block.ts]
+Token from 11 to 20 with scopes [source.ts, meta.function.ts, meta.block.ts, variable.other.object.ts]
+Token from 20 to 21 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 21 to 27 with scopes [source.ts, meta.function.ts, meta.block.ts, entity.name.function.ts]
+Token from 27 to 28 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 28 to 40 with scopes [source.ts, meta.function.ts, meta.block.ts, entity.name.function.ts]
+Token from 40 to 41 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 41 to 42 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 42 to 43 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 43 to 44 with scopes [source.ts, meta.function.ts, meta.block.ts]
+Token from 44 to 47 with scopes [source.ts, meta.function.ts, meta.block.ts, variable.other.readwrite.ts]
+Token from 47 to 48 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 48 to 49 with scopes [source.ts, meta.function.ts, meta.block.ts]
+Token from 49 to 53 with scopes [source.ts, meta.function.ts, meta.block.ts, variable.other.object.ts]
+Token from 53 to 54 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 54 to 59 with scopes [source.ts, meta.function.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 59 to 60 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.separator.comma.ts]
+Token from 60 to 61 with scopes [source.ts, meta.function.ts, meta.block.ts]
+Token from 61 to 65 with scopes [source.ts, meta.function.ts, meta.block.ts, variable.other.object.ts]
+Token from 65 to 66 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.accessor.ts]
+Token from 66 to 72 with scopes [source.ts, meta.function.ts, meta.block.ts, support.variable.property.dom.ts]
+Token from 72 to 73 with scopes [source.ts, meta.function.ts, meta.block.ts, meta.brace.round.ts]
+Token from 73 to 74 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.terminator.statement.ts]
+Token from 0 to 1 with scopes [source.ts, meta.function.ts, meta.block.ts, punctuation.definition.block.ts]
+Token from 0 to 1 with scopes [source.ts]
+Token from 0 to 4 with scopes [source.ts, entity.name.function.ts]
+Token from 4 to 5 with scopes [source.ts, meta.brace.round.ts]
+Token from 5 to 6 with scopes [source.ts, meta.brace.round.ts]
+Token from 6 to 7 with scopes [source.ts, punctuation.terminator.statement.ts]

From 75b6a33591ddc56d544c0990931e65037c3ddcc1 Mon Sep 17 00:00:00 2001
From: sebthom 
Date: Tue, 17 May 2022 22:00:43 +0200
Subject: [PATCH 41/41] Update tm4e dependencies

---
 org.eclipse.tm4e.languageconfiguration/META-INF/MANIFEST.MF | 4 ++--
 org.eclipse.tm4e.markdown/META-INF/MANIFEST.MF              | 6 +++---
 org.eclipse.tm4e.registry/META-INF/MANIFEST.MF              | 2 +-
 org.eclipse.tm4e.ui/META-INF/MANIFEST.MF                    | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/org.eclipse.tm4e.languageconfiguration/META-INF/MANIFEST.MF b/org.eclipse.tm4e.languageconfiguration/META-INF/MANIFEST.MF
index fcd31c446..02cb1ec92 100644
--- a/org.eclipse.tm4e.languageconfiguration/META-INF/MANIFEST.MF
+++ b/org.eclipse.tm4e.languageconfiguration/META-INF/MANIFEST.MF
@@ -9,8 +9,8 @@ Bundle-RequiredExecutionEnvironment: JavaSE-17
 Require-Bundle: org.eclipse.jface.text,
  org.eclipse.ui.genericeditor,
  com.google.gson;bundle-version="2.9.0",
- org.eclipse.tm4e.core;bundle-version="0.4.4",
- org.eclipse.tm4e.ui;bundle-version="0.5.1",
+ org.eclipse.tm4e.core;bundle-version="0.4.6",
+ org.eclipse.tm4e.ui;bundle-version="0.5.2",
  org.eclipse.core.runtime,
  org.eclipse.core.resources,
  org.eclipse.ui,
diff --git a/org.eclipse.tm4e.markdown/META-INF/MANIFEST.MF b/org.eclipse.tm4e.markdown/META-INF/MANIFEST.MF
index d82a99c60..e36b77957 100644
--- a/org.eclipse.tm4e.markdown/META-INF/MANIFEST.MF
+++ b/org.eclipse.tm4e.markdown/META-INF/MANIFEST.MF
@@ -6,9 +6,9 @@ Bundle-Localization: plugin
 Bundle-SymbolicName: org.eclipse.tm4e.markdown;singleton:=true
 Bundle-Version: 0.3.7.qualifier
 Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.tm4e.core;bundle-version="0.4.4",
- org.eclipse.tm4e.registry;bundle-version="0.5.1",
- org.eclipse.tm4e.ui;bundle-version="0.5.1",
+ org.eclipse.tm4e.core;bundle-version="0.4.6",
+ org.eclipse.tm4e.registry;bundle-version="0.5.2",
+ org.eclipse.tm4e.ui;bundle-version="0.5.2",
  com.google.guava;bundle-version="30.1.0"
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Export-Package: org.eclipse.tm4e.markdown,
diff --git a/org.eclipse.tm4e.registry/META-INF/MANIFEST.MF b/org.eclipse.tm4e.registry/META-INF/MANIFEST.MF
index c57bef45d..bd9ffb671 100644
--- a/org.eclipse.tm4e.registry/META-INF/MANIFEST.MF
+++ b/org.eclipse.tm4e.registry/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@ Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.tm4e.registry;singleton:=true
 Bundle-Version: 0.5.2.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-17
-Require-Bundle: org.eclipse.tm4e.core;bundle-version="0.4.4",
+Require-Bundle: org.eclipse.tm4e.core;bundle-version="0.4.6",
  org.eclipse.core.runtime,
  com.google.gson;bundle-version="2.9.0",
  com.google.guava;bundle-version="30.1.0",
diff --git a/org.eclipse.tm4e.ui/META-INF/MANIFEST.MF b/org.eclipse.tm4e.ui/META-INF/MANIFEST.MF
index 6f432a976..0890bfd3b 100644
--- a/org.eclipse.tm4e.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.tm4e.ui/META-INF/MANIFEST.MF
@@ -5,13 +5,13 @@ Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Bundle-SymbolicName: org.eclipse.tm4e.ui;singleton:=true
 Bundle-Version: 0.5.2.qualifier
-Require-Bundle: org.eclipse.tm4e.core;bundle-version="0.4.4",
+Require-Bundle: org.eclipse.tm4e.core;bundle-version="0.4.6",
  org.eclipse.jface.text,
  org.eclipse.core.runtime,
  org.eclipse.ui,
  org.eclipse.core.resources,
  org.eclipse.core.filesystem,
- org.eclipse.tm4e.registry,
+ org.eclipse.tm4e.registry;bundle-version="0.5.2",
  org.eclipse.ui.ide;resolution:=optional,
  com.google.gson;bundle-version="2.9.0",
  com.google.guava,