/// <summary> /// Creates a label parsed item /// </summary> private ParsedLabel CreateParsedLabel(Token labelToken) { var newLabel = new ParsedLabel(_context.CurrentStatement.FirstToken.Value, _context.CurrentStatement.FirstToken); AddParsedItem(newLabel, labelToken.OwnerNumber); return(newLabel); }
/// <summary> /// Labels /// </summary> /// <param name="pars"></param> public void Visit(ParsedLabel pars) { // find the end line of the labeled if (pars.Block != null) { pars.UndefinedLine = pars.Block.EndBlockLine; } // to completion data PushToAutoCompletion(new LabelCompletionItem { DisplayText = pars.Name, Flags = pars.Flags, }, pars); }
public void ScanSentence(string Sentence, IEnumerable <AssemblerProcedure> ProcStac) { var m = labelReg.Match(Sentence); if (m != null && m.Success && !string.IsNullOrWhiteSpace(m.Groups[1].Value)) { string labelValue = m.Groups[1].Value; if (ProcStac != null && ProcStac.Any(p => p.IsLocal(labelValue))) { return; } string fullName = $"{SegmentPath}{m.Groups[1].Value}"; if (!globalLabels.Any(l => l.NameOnNamespace == fullName)) { ParsedLabel label = new ParsedLabel(m.Groups[1].Value, fullName); globalLabels.Add(label); } } }
public void Visit(ParsedLabel pars) { AppendEverything(pars); }
public void AddLabel(string Label) { ParsedLabel label = new ParsedLabel(Label, $"{SegmentPath}{Label}"); globalLabels.Add(label); }