public boolean visit(LambdaFunctionDeclaration s) throws Exception { Map<String, String> parameters = createInitialParameters(s); parameters.put("isReference", Boolean.toString(s.isReference())); if (s.isStatic()) { parameters.put("isStatic", Boolean.toString(s.isStatic())); } xmlWriter.startTag("LambdaFunctionDeclaration", parameters); xmlWriter.startTag("Arguments", new HashMap<String, String>()); for (FormalParameter p : s.getArguments()) { p.traverse(this); } xmlWriter.endTag("Arguments"); Collection<? extends Expression> lexicalVars = s.getLexicalVars(); if (lexicalVars != null) { xmlWriter.startTag("LexicalVars", new HashMap<String, String>()); for (Expression var : lexicalVars) { var.traverse(this); } xmlWriter.endTag("LexicalVars"); } s.getBody().traverse(this); return false; }
public boolean visit(UsePart s) throws Exception { Map<String, String> parameters = createInitialParameters(s); xmlWriter.startTag("UsePart", parameters); s.getNamespace().traverse(this); if (s.getAlias() != null) { s.getAlias().traverse(this); } xmlWriter.endTag("UsePart"); return false; }
public boolean visit(FullyQualifiedTraitMethodReference s) throws Exception { Map<String, String> parameters = createInitialParameters(s); parameters.put("functionName", s.getFunctionName()); xmlWriter.startTag("FullyQualifiedTraitMethodReference", parameters); xmlWriter.startTag("className", EMPTY_MAP); s.getClassName().traverse(this); xmlWriter.endTag("className"); xmlWriter.endTag("FullyQualifiedTraitMethodReference"); return false; }
public boolean visit(UseStatement s) throws Exception { Map<String, String> parameters = createInitialParameters(s); xmlWriter.startTag("UseStatement", parameters); xmlWriter.startTag("Parts", new HashMap<String, String>()); for (UsePart p : s.getParts()) { p.traverse(this); } xmlWriter.endTag("Parts"); xmlWriter.endTag("UseStatement"); return false; }
public boolean endvisit(ModuleDeclaration s) throws Exception { List<ASTError> errors = ((PHPModuleDeclaration) s).getErrors(); if (!errors.isEmpty()) { xmlWriter.startTag("Errors", null); for (ASTError error : errors) { error.traverse(this); } xmlWriter.endTag("Errors"); } xmlWriter.endTag("ModuleDeclaration"); return true; }
public boolean visit(Scalar s) throws Exception { Map<String, String> parameters = createInitialParameters(s); parameters.put("type", s.getType()); parameters.put("value", s.getValue()); xmlWriter.startTag("Scalar", parameters); return true; }
public boolean visit(ArrayVariableReference s) throws Exception { Map<String, String> parameters = createInitialParameters(s); parameters.put("type", ArrayVariableReference.getArrayType(s.getArrayType())); parameters.put("name", s.getName()); xmlWriter.startTag("ArrayVariableReference", parameters); return true; }
public boolean visit(PHPDocTag s) throws Exception { Map<String, String> parameters = createInitialParameters(s); parameters.put("tagKind", PHPDocTag.getTagKind(s.getTagKind())); parameters.put("value", s.getValue()); xmlWriter.startTag("PHPDocTag", parameters); return true; }
public boolean visit(NamespaceReference s) throws Exception { Map<String, String> parameters = createInitialParameters(s); parameters.put("name", s.getName()); parameters.put("global", Boolean.toString(s.isGlobal())); parameters.put("local", Boolean.toString(s.isLocal())); xmlWriter.startTag("NamespaceReference", parameters); return true; }
public boolean visit(ForStatement s) throws Exception { Map<String, String> parameters = createInitialParameters(s); xmlWriter.startTag("ForStatement", parameters); xmlWriter.startTag("Initializations", new HashMap<String, String>()); for (Expression initialization : s.getInitializations()) { initialization.traverse(this); } xmlWriter.endTag("Initializations"); xmlWriter.startTag("Conditions", new HashMap<String, String>()); for (Expression condition : s.getConditions()) { condition.traverse(this); } xmlWriter.endTag("Conditions"); xmlWriter.startTag("Increasements", new HashMap<String, String>()); for (Expression increasement : s.getIncreasements()) { increasement.traverse(this); } xmlWriter.endTag("Increasements"); s.getAction().traverse(this); return false; }
public boolean visit(TraitAlias s) throws Exception { Map<String, String> parameters = createInitialParameters(s); if (s.getMethodName() != null) { parameters.put("methodName", s.getMethodName().getName()); } xmlWriter.startTag("TraitAlias", parameters); return true; }
public boolean visit(IfStatement s) throws Exception { Map<String, String> parameters = createInitialParameters(s); xmlWriter.startTag("IfStatement", parameters); xmlWriter.startTag("Condition", new HashMap<String, String>()); s.getCondition().traverse(this); xmlWriter.endTag("Condition"); xmlWriter.startTag("TrueStatement", new HashMap<String, String>()); s.getTrueStatement().traverse(this); xmlWriter.endTag("TrueStatement"); Statement falseStatement = s.getFalseStatement(); if (falseStatement != null) { xmlWriter.startTag("FalseStatement", new HashMap<String, String>()); falseStatement.traverse(this); xmlWriter.endTag("FalseStatement"); } return false; }
public boolean visit(ConditionalExpression s) throws Exception { Map<String, String> parameters = createInitialParameters(s); xmlWriter.startTag("ConditionalExpression", parameters); xmlWriter.startTag("Condition", new HashMap<String, String>()); s.getCondition().traverse(this); xmlWriter.endTag("Condition"); Expression ifTrue = s.getIfTrue(); if (ifTrue != null) { xmlWriter.startTag("IfTrue", new HashMap<String, String>()); ifTrue.traverse(this); xmlWriter.endTag("IfTrue"); } Expression falseExp = s.getIfFalse(); if (falseExp != null) { xmlWriter.startTag("IfFalse", new HashMap<String, String>()); falseExp.traverse(this); xmlWriter.endTag("IfFalse"); } return false; }
public boolean visit(WhileStatement s) throws Exception { Map<String, String> parameters = createInitialParameters(s); xmlWriter.startTag("WhileStatement", parameters); return true; }
public boolean visit(UnaryOperation s) throws Exception { Map<String, String> parameters = createInitialParameters(s); parameters.put("operator", s.getOperator()); xmlWriter.startTag("UnaryOperation", parameters); return true; }
public boolean visit(FullyQualifiedReference s) throws Exception { Map<String, String> parameters = createInitialParameters(s); parameters.put("name", s.getFullyQualifiedName()); xmlWriter.startTag("FullyQualifiedReference", parameters); return true; }
public boolean visit(SwitchCase s) throws Exception { Map<String, String> parameters = createInitialParameters(s); xmlWriter.startTag("SwitchCase", parameters); return true; }
public boolean visit(StaticMethodInvocation s) throws Exception { Map<String, String> parameters = createInitialParameters(s); xmlWriter.startTag("StaticMethodInvocation", parameters); return true; }
public boolean visit(PHPCallArgumentsList s) throws Exception { Map<String, String> parameters = createInitialParameters(s); xmlWriter.startTag("PHPCallArgumentsList", parameters); return true; }
public boolean visit(FormalParameter s) throws Exception { Map<String, String> parameters = createInitialParameters(s); parameters.put("isMandatory", Boolean.toString(s.isMandatory())); xmlWriter.startTag("FormalParameter", parameters); return true; }
public boolean visit(ReflectionVariableReference s) throws Exception { Map<String, String> parameters = createInitialParameters(s); xmlWriter.startTag("ReflectionVariableReference", parameters); return true; }
public boolean visit(FormalParameterByReference s) throws Exception { Map<String, String> parameters = createInitialParameters(s); xmlWriter.startTag("FormalParameterByReference", parameters); return true; }
public boolean visit(IgnoreError s) throws Exception { Map<String, String> parameters = createInitialParameters(s); xmlWriter.startTag("IgnoreError", parameters); return true; }
public boolean visit(PHPDocBlock s) throws Exception { Map<String, String> parameters = createInitialParameters(s); parameters.put("shortDescription", s.getShortDescription()); xmlWriter.startTag("PHPDocBlock", parameters); return true; }
public boolean visit(ModuleDeclaration s) throws Exception { Map<String, String> parameters = createInitialParameters(s); xmlWriter.startTag("ModuleDeclaration", parameters); return true; }
public boolean visit(StaticFieldAccess s) throws Exception { Map<String, String> parameters = createInitialParameters(s); xmlWriter.startTag("StaticFieldAccess", parameters); return true; }
public boolean visit(NamespaceDeclaration s) throws Exception { Map<String, String> parameters = createInitialParameters(s); parameters.put("name", s.getName()); xmlWriter.startTag("NamespaceDeclaration", parameters); return true; }
public boolean visit(ListVariable s) throws Exception { Map<String, String> parameters = createInitialParameters(s); xmlWriter.startTag("ListVariable", parameters); return true; }
public boolean visit(Quote s) throws Exception { Map<String, String> parameters = createInitialParameters(s); parameters.put("type", Quote.getType(s.getQuoteType())); xmlWriter.startTag("Quote", parameters); return true; }
public boolean visit(ReflectionCallExpression s) throws Exception { Map<String, String> parameters = createInitialParameters(s); xmlWriter.startTag("ReflectionCallExpression", parameters); return true; }