void addToken( SableCC.node.Token token ) { Debug.Assert( !( token is SableCC.node.TTab || token is SableCC.node.TLineComment || token is SableCC.node.TMultilineComment || token is SableCC.node.TSpace ), "tabs, spaces, and comments cannot be present after fixup"); Debug.Assert( ! (token is SableCC.node.TNewline && _outTokens.Last.Value is SableCC.node.TNewline), "newlines cannot follow newlines after fixup"); _outTokens.AddLast(token); }
string getSource(SableCC.node.Token token) { string location = String.Format("{0}:{1}", token.Line, token.Pos); return String.Format( "Fujin : {0} : {1}", _fileSource, location); }
string tokenInfo(SableCC.node.Token token) { return String.Format( "type {0} with value '{1}' at {2}:{3}", (token as object).GetType(), token.Text, token.Line, token.Pos); }
public override void DefaultCase(SableCC.node.Node node) { //xxx should be using Bridge Console.WriteLine(node); }