public static void RemoveTypeHint( this Tokenizer <NeuToken> tokenizer, NeuTypeIdentifier typeIdentifier) { var t = tokenizer as NeuTokenizer; if (t == null) { throw new Exception($"Unsupported tokenizer"); } /// var first = t.TypeHints.FirstOrDefault(); /// if (first == null) { throw new Exception(); } /// if (!Equals(first, typeIdentifier)) { throw new Exception(); } /// t.TypeHints.Pop(); }
/// public NeuReturnClause( NeuTypeIdentifier typeId) : base( new Node[] { new NeuPunc("->", new UnknownLocation(), new UnknownLocation(), NeuPuncType.Arrow), typeId }, new UnknownLocation(), new UnknownLocation()) { }
public static void AddTypeHint( this Tokenizer <NeuToken> tokenizer, NeuTypeIdentifier typeIdentifier) { var t = tokenizer as NeuTokenizer; if (t == null) { throw new Exception($"Unsupported tokenizer"); } /// t.TypeHints.Push(typeIdentifier); }