public UstNode VisitClassBodyDeclaration(JavaParser.ClassBodyDeclarationContext context) { var block = context.block(); if (block != null) { var blockStatement = (BlockStatement)Visit(block); return(new StatementDeclaration(blockStatement, context.GetTextSpan(), FileNode)); } else { return(Visit(context.memberDeclaration())); } }
public Ust VisitClassBodyDeclaration(JavaParser.ClassBodyDeclarationContext context) { var block = context.block(); if (block != null) { var blockStatement = (BlockStatement)Visit(block); return(new StatementDeclaration(blockStatement, context.GetTextSpan())); } else { var result = Visit(context.memberDeclaration()) as EntityDeclaration; if (result != null) { result.Modifiers = context.modifier().Select(Visit).OfType <ModifierLiteral>().ToList(); return(result); } else { return(VisitChildren(context)); } } }