Logo Search packages:      
Sourcecode: jruby0.9 version File versions  Download package

org::jruby::ast::visitor::rewriter::ReWriteVisitor Class Reference

Inheritance diagram for org::jruby::ast::visitor::rewriter::ReWriteVisitor:


List of all members.

Detailed Description

Visits each node and outputs the corresponding Ruby sourcecode for the nodes.

Mirko Stocker

Definition at line 56 of file ReWriteVisitor.java.

Public Member Functions

void flushStream ()
ReWriterContext getConfig ()
 ReWriteVisitor (ReWriterContext config)
 ReWriteVisitor (OutputStream out, String source)
 ReWriteVisitor (Writer out, String source)
Instruction visitAliasNode (AliasNode iVisited)
Instruction visitAndNode (AndNode iVisited)
void visitAndPrintWithSeparator (Iterator it)
Instruction visitArgsCatNode (ArgsCatNode iVisited)
Instruction visitArgsNode (ArgsNode iVisited)
Instruction visitArgsPushNode (ArgsPushNode node)
Instruction visitArrayNode (ArrayNode iVisited)
Instruction visitAttrAssignNode (AttrAssignNode iVisited)
Instruction visitBackRefNode (BackRefNode iVisited)
Instruction visitBeginNode (BeginNode iVisited)
Instruction visitBignumNode (BignumNode iVisited)
Instruction visitBlockArgNode (BlockArgNode iVisited)
Instruction visitBlockNode (BlockNode iVisited)
Instruction visitBlockPassNode (BlockPassNode iVisited)
Instruction visitBreakNode (BreakNode iVisited)
Instruction visitCallNode (CallNode iVisited)
Instruction visitCaseNode (CaseNode iVisited)
Instruction visitClassNode (ClassNode iVisited)
Instruction visitClassVarAsgnNode (ClassVarAsgnNode iVisited)
Instruction visitClassVarDeclNode (ClassVarDeclNode iVisited)
Instruction visitClassVarNode (ClassVarNode iVisited)
Instruction visitColon2Node (Colon2Node iVisited)
Instruction visitColon3Node (Colon3Node iVisited)
Instruction visitConstDeclNode (ConstDeclNode iVisited)
Instruction visitConstNode (ConstNode iVisited)
Instruction visitDAsgnNode (DAsgnNode iVisited)
Instruction visitDefinedNode (DefinedNode iVisited)
Instruction visitDefnNode (DefnNode iVisited)
Instruction visitDefsNode (DefsNode iVisited)
Instruction visitDotNode (DotNode iVisited)
Instruction visitDRegxNode (DRegexpNode iVisited)
Instruction visitDStrNode (DStrNode iVisited)
Instruction visitDSymbolNode (DSymbolNode iVisited)
Instruction visitDVarNode (DVarNode iVisited)
Instruction visitDXStrNode (DXStrNode iVisited)
Instruction visitEnsureNode (EnsureNode iVisited)
Instruction visitEvStrNode (EvStrNode iVisited)
Instruction visitFalseNode (FalseNode iVisited)
Instruction visitFCallNode (FCallNode iVisited)
Instruction visitFixnumNode (FixnumNode iVisited)
Instruction visitFlipNode (FlipNode iVisited)
Instruction visitFloatNode (FloatNode iVisited)
Instruction visitForNode (ForNode iVisited)
Instruction visitGlobalAsgnNode (GlobalAsgnNode iVisited)
Instruction visitGlobalVarNode (GlobalVarNode iVisited)
Instruction visitHashNode (HashNode iVisited)
Instruction visitIfNode (IfNode iVisited)
Instruction visitInstAsgnNode (InstAsgnNode iVisited)
Instruction visitInstVarNode (InstVarNode iVisited)
void visitIter (Iterator iterator)
Instruction visitIterNode (IterNode iVisited)
Instruction visitLocalAsgnNode (LocalAsgnNode iVisited)
Instruction visitLocalVarNode (LocalVarNode iVisited)
Instruction visitMatch2Node (Match2Node iVisited)
Instruction visitMatch3Node (Match3Node iVisited)
Instruction visitMatchNode (MatchNode iVisited)
Instruction visitModuleNode (ModuleNode iVisited)
Instruction visitMultipleAsgnNode (MultipleAsgnNode iVisited)
Instruction visitNewlineNode (NewlineNode iVisited)
Instruction visitNextNode (NextNode iVisited)
Instruction visitNilNode (NilNode iVisited)
void visitNode (Node iVisited)
void visitNodeInIndentation (Node n)
Instruction visitNotNode (NotNode iVisited)
Instruction visitNthRefNode (NthRefNode iVisited)
Instruction visitOpAsgnAndNode (OpAsgnAndNode iVisited)
Instruction visitOpAsgnNode (OpAsgnNode iVisited)
Instruction visitOpAsgnOrNode (OpAsgnOrNode iVisited)
Instruction visitOpElementAsgnNode (OpElementAsgnNode iVisited)
Instruction visitOptNNode (OptNNode iVisited)
Instruction visitOrNode (OrNode iVisited)
Instruction visitPostExeNode (PostExeNode iVisited)
Instruction visitRedoNode (RedoNode iVisited)
Instruction visitRegexpNode (RegexpNode iVisited)
Instruction visitRescueBodyNode (RescueBodyNode iVisited)
Instruction visitRescueNode (RescueNode iVisited)
Instruction visitRetryNode (RetryNode iVisited)
Instruction visitReturnNode (ReturnNode iVisited)
Instruction visitRootNode (RootNode iVisited)
Instruction visitSClassNode (SClassNode iVisited)
Instruction visitSelfNode (SelfNode iVisited)
Instruction visitSplatNode (SplatNode iVisited)
Instruction visitStrNode (StrNode iVisited)
Instruction visitSuperNode (SuperNode iVisited)
Instruction visitSValueNode (SValueNode iVisited)
Instruction visitSymbolNode (SymbolNode iVisited)
Instruction visitToAryNode (ToAryNode iVisited)
Instruction visitTrueNode (TrueNode iVisited)
Instruction visitUndefNode (UndefNode iVisited)
Instruction visitUntilNode (UntilNode iVisited)
Instruction visitVAliasNode (VAliasNode iVisited)
Instruction visitVCallNode (VCallNode iVisited)
Instruction visitWhenNode (WhenNode iVisited)
Instruction visitWhileNode (WhileNode iVisited)
Instruction visitXStrNode (XStrNode iVisited)
Instruction visitYieldNode (YieldNode iVisited)
Instruction visitZArrayNode (ZArrayNode iVisited)
Instruction visitZSuperNode (ZSuperNode iVisited)

Static Public Member Functions

static String createCodeFromNode (Node node, String document, FormatHelper helper)
static String createCodeFromNode (Node node, String document)
static Node firstChild (Node n)
static int getLocalVarIndex (Node n)
static String unescapeChar (char escapedChar)
static Node unwrapSingleArrayNode (Node n)

Protected Member Functions

char getSeparatorForStr (Node n)
char getSeparatorForSym (Node n)
boolean inDRegxNode ()
boolean inMultipleAssignment ()
void print (double d)
void print (long l)
void print (int i)
void print (BigInteger i)
void print (char c)
void print (String s)
void printAssignmentOperator ()
boolean printCommentsAfter (Node iVisited)
void printCommentsAtEnd (Node n)
void printNewlineAndIndentation ()
void visitNewlineInParentheses (Node n)

Static Protected Member Functions

static int getEndOffset (Node n)

Protected Attributes

final ReWriterContext config
final ReWriterFactory factory

Private Member Functions

ArrayList collectAllArguments (ArgsNode iVisited)
Instruction createHereDocument (DStrNode iVisited)
void enterCall ()
String getFirstRegexpEnclosure (Node n)
String getSecondRegexpEnclosure (Node n)
boolean hasArguments (Node n)
boolean hasNodeCommentsAtEnd (Node n)
boolean inCall ()
boolean isAssignment (Node n)
boolean isNameAnOperator (String name)
boolean isNegativeNumericNode (CallNode visited)
boolean isNumericNode (Node n)
boolean isOnSingleLine (Node n1, Node n2)
boolean isOnSingleLine (Node n)
boolean isShortIfStatement (IfNode iVisited)
boolean isSimpleNode (Node n)
boolean isSpecialRegexNotation (Node n)
void leaveCall ()
boolean needsParentheses (Node n)
boolean needsSuperNodeParentheses (SuperNode n)
void printAsgnNode (AssignableNode n)
void printCallArguments (Node argsNode, Node iterNode)
void printCallReceiverNode (CallNode iVisited)
void printCommentsBefore (Node iVisited)
boolean printCommentsIn (Node iVisited)
void printCommentsInArgs (Node n, boolean hasNext)
void printDefNode (Node parent, String name, Node args, StaticScope scope, Node bodyNode)
void printDoWhileStatement (WhileNode iVisited)
Node printElsIfNodes (Node iVisited)
void printExceptionNode (RescueBodyNode n)
void printHashNodeContent (HashNode iVisited)
Instruction printIndexAccess (CallNode visited)
Instruction printIndexAssignment (AttrAssignNode iVisited)
boolean printIterVarNode (IterNode n)
void printNameWithoutEqualSign (INameNode iVisited)
Instruction printNegativNumericNode (CallNode visited)
void printOpAsgnNode (Node n, String operator)
void printRegexpOptions (int option)
Instruction printShortIfStatement (IfNode n)
boolean printSpaceInsteadOfDot (CallNode n)
void printWhileStatement (WhileNode iVisited)
boolean sourceRangeContains (ISourcePosition pos, String searched)
boolean sourceRangeEquals (int start, int stop, String compare)
boolean sourceSubStringEquals (int offset, int length, String str)
boolean stringIsHereDocument (StrNode n)
Node unwrapNewlineNode (Node node)
void visitIterAndSkipFirst (Iterator iterator)

Static Private Member Functions

static int getEndLine (Node n)
static int getStartLine (Node n)
static int getStartOffset (Node n)
static boolean isReceiverACallNode (CallNode n)
static boolean isStartOnNewLine (Node first, Node second)

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index