public static string GetName(this RadAsmTokenType type) { switch (type) { case RadAsmTokenType.FunctionParameter: return("argument"); case RadAsmTokenType.Label: return("label"); case RadAsmTokenType.GlobalVariable: return("global variable"); case RadAsmTokenType.LocalVariable: return("local variable"); case RadAsmTokenType.FunctionName: return("function"); case RadAsmTokenType.Instruction: return("instruction"); default: return("unknown"); } }
public TextTag(RadAsmTokenType type, Span span) { Type = type; Span = span; }
public DefinitionToken(RadAsmTokenType tokenType, TrackingToken trackingToken, ITextSnapshot snapshot) : base(tokenType, trackingToken, snapshot) { References = new LinkedList <IAnalysisToken>(); _text = base.GetText(); }
public ClassifiedTextBuilder AddClassifiedText(RadAsmTokenType tokenType, string text) { _classifiedTextRuns.AddLast(new ClassifiedTextRun(tokenType.GetClassificationTypeName(), text)); return(this); }
public VariableToken(RadAsmTokenType type, TrackingToken token, ITextSnapshot snapshot, TrackingToken defaultValue = default) : base(type, token, snapshot) { DefaultValue = defaultValue; }
private bool IsLeftOrRightBracket(int type, RadAsmTokenType lBracket, RadAsmTokenType rBracket) { var tokenType = _tokenizer.GetTokenType(type); return(tokenType == lBracket || tokenType == rBracket); }
public InstructionToken(RadAsmTokenType tokenType, TrackingToken trackingToken, ITextSnapshot snapshot) : base(tokenType, trackingToken, snapshot) { Parameters = new LinkedList <IAnalysisToken>(); }
public ReferenceToken(RadAsmTokenType tokenType, TrackingToken trackingToken, ITextSnapshot snapshot, DefinitionToken definitionToken) : base(tokenType, trackingToken, snapshot) { Definition = definitionToken; Definition.AddReference(this); }
public FunctionToken(RadAsmTokenType tokenType, TrackingToken trackingToken, ITextSnapshot snapshot) : base(tokenType, trackingToken, snapshot) { }
public static void AddTag(this IList <TextTag> tags, RadAsmTokenType type, int start, int length) => tags.Add(new TextTag(type, new Span(start, length)));
public static void AddTag(this IList <TextTag> tags, RadAsmTokenType type, Span span) => tags.Add(new TextTag(type, span));
private static bool IsTypeOf(this IDocumentTokenizer tokenizer, int tokenType, RadAsmTokenType targetTokenType) => tokenizer.GetTokenType(tokenType) == targetTokenType;
public AnalysisToken(RadAsmTokenType tokenType, TrackingToken trackingToken, ITextSnapshot snapshot) { Type = tokenType; TrackingToken = trackingToken; Span = new SnapshotSpan(snapshot, TrackingToken.GetSpan(snapshot)); }
public static string GetClassificationTypeName(this RadAsmTokenType tokenType) => _classificationTypeNames[tokenType];
public IncludeToken(RadAsmTokenType tokenType, TrackingToken trackingToken, ITextSnapshot snapshot) : base(tokenType, trackingToken, snapshot) { throw new NotImplementedException(); }