void GimmehStatement(out Statement stat) { InputStatement ins = new InputStatement(GetPragma(la)); stat = ins; Expect(24); if (la.kind == 25 || la.kind == 26 || la.kind == 27) { if (la.kind == 25) { Get(); } else if (la.kind == 26) { Get(); ins.amount = IOAmount.Word; } else { Get(); ins.amount = IOAmount.Letter; } } LValue(out ins.dest); SetEndPragma(stat); }
private void RenderRepresentation(InputStatement statement, params string[] exceptedRepresentations) { if (statement.Representations.Count <= exceptedRepresentations.Length) { return; } result.Append('('); HashSet <string> exceptions = new HashSet <string>(StringComparer.OrdinalIgnoreCase); foreach (string excepted in exceptedRepresentations) { exceptions.Add(excepted); } foreach (string representation in statement.Representations) { if (exceptions.Contains(representation)) { continue; } result.Append(representation); result.Append(", "); } result.Remove(result.Length - 2, 2); result.Append(')'); }
public override string VisitInputStatement(BasicParser.InputStatementContext context) { var variableName = context.VARNAME().ToString(); var inputStatement = new InputStatement(variableName); Statements[_currentLineNumber] = inputStatement; return(base.VisitInputStatement(context)); }
private static IBlock BuildParametersSection(InputStatement statement) { Section result = new Section(new Header("Parameters")); foreach (Parameter parameter in statement.Parameters) { result = result.AddChild(BuildParameterInfo(parameter)); } return(result); }