org.codehaus.groovy.antlr
Class AntlrASTProcessSnippets

java.lang.Object
  extended by org.codehaus.groovy.antlr.AntlrASTProcessSnippets
All Implemented Interfaces:
AntlrASTProcessor

public class AntlrASTProcessSnippets
extends java.lang.Object
implements AntlrASTProcessor


Field Summary
private  SourceBuffer sourceBuffer
           
 
Constructor Summary
AntlrASTProcessSnippets(SourceBuffer sourceBuffer)
           
 
Method Summary
 antlr.collections.AST process(antlr.collections.AST t)
          decorate antlr AST with ending line/col info, and if possible the snipppet of source from the start/end line/col for each node.
private  antlr.collections.AST traverse(GroovySourceAST t, java.util.List l, java.util.Iterator itr)
          traverse an AST node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sourceBuffer

private final SourceBuffer sourceBuffer
Constructor Detail

AntlrASTProcessSnippets

public AntlrASTProcessSnippets(SourceBuffer sourceBuffer)
Method Detail

process

public antlr.collections.AST process(antlr.collections.AST t)
decorate antlr AST with ending line/col info, and if possible the snipppet of source from the start/end line/col for each node.

Specified by:
process in interface AntlrASTProcessor
Parameters:
t - the AST to decorate
Returns:
the decorated AST

traverse

private antlr.collections.AST traverse(GroovySourceAST t,
                                       java.util.List l,
                                       java.util.Iterator itr)
traverse an AST node

Parameters:
t - the AST node to traverse
l - A list to add line/col info to
itr - An iterator over a list of line/col
Returns:
A decorated AST node


Copyright © ${year} The Codehaus. All Rights Reserved.