Skip to content

Commit

Permalink
Redo SourceRoot again
Browse files Browse the repository at this point in the history
  • Loading branch information
matozoid committed Nov 15, 2017
1 parent 1b1e7df commit 26b23bc
Show file tree
Hide file tree
Showing 7 changed files with 231 additions and 179 deletions.
@@ -1,10 +1,8 @@
package com.github.javaparser.generator.core;

import com.github.javaparser.JavaParser;
import com.github.javaparser.ParserConfiguration;
import com.github.javaparser.generator.core.node.*;
import com.github.javaparser.generator.core.visitor.*;
import com.github.javaparser.printer.lexicalpreservation.LexicalPreservingPrinter;
import com.github.javaparser.utils.SourceRoot;

import java.nio.file.Path;
Expand All @@ -21,12 +19,11 @@ public static void main(String[] args) throws Exception {
final Path root = Paths.get(args[0], "..", "javaparser-core", "src", "main", "java");
final SourceRoot sourceRoot = new SourceRoot(root)
// .setPrinter(LexicalPreservingPrinter::print)
.setJavaParser(new JavaParser(
new ParserConfiguration()
.setParserConfiguration(new ParserConfiguration()
// .setStoreTokens(false)
// .setAttributeComments(false)
// .setLexicalPreservationEnabled(true)
));
);

new CoreGenerator().run(sourceRoot);

Expand Down
Expand Up @@ -40,7 +40,6 @@
import com.github.javaparser.TokenRange;
import com.github.javaparser.resolution.SymbolResolver;
import com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration;

import java.util.function.Consumer;

/**
Expand Down
Expand Up @@ -44,7 +44,6 @@
import com.github.javaparser.TokenRange;
import com.github.javaparser.resolution.declarations.ResolvedConstructorDeclaration;
import com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration;

import java.util.function.Consumer;

/**
Expand Down
Expand Up @@ -38,7 +38,7 @@
*/
public interface GenericVisitor<R, A> {

//- Compilation Unit ----------------------------------
// - Compilation Unit ----------------------------------
@Generated("com.github.javaparser.generator.core.visitor.GenericVisitorGenerator")
R visit(CompilationUnit n, A arg);

Expand All @@ -54,7 +54,7 @@ public interface GenericVisitor<R, A> {
@Generated("com.github.javaparser.generator.core.visitor.GenericVisitorGenerator")
R visit(BlockComment n, A arg);

//- Body ----------------------------------------------
// - Body ----------------------------------------------
@Generated("com.github.javaparser.generator.core.visitor.GenericVisitorGenerator")
R visit(ClassOrInterfaceDeclaration n, A arg);

Expand Down Expand Up @@ -91,7 +91,7 @@ public interface GenericVisitor<R, A> {
@Generated("com.github.javaparser.generator.core.visitor.GenericVisitorGenerator")
R visit(JavadocComment n, A arg);

//- Type ----------------------------------------------
// - Type ----------------------------------------------
@Generated("com.github.javaparser.generator.core.visitor.GenericVisitorGenerator")
R visit(ClassOrInterfaceType n, A arg);

Expand Down Expand Up @@ -119,7 +119,7 @@ public interface GenericVisitor<R, A> {
@Generated("com.github.javaparser.generator.core.visitor.GenericVisitorGenerator")
R visit(UnknownType n, A arg);

//- Expression ----------------------------------------
// - Expression ----------------------------------------
@Generated("com.github.javaparser.generator.core.visitor.GenericVisitorGenerator")
R visit(ArrayAccessExpr n, A arg);

Expand Down Expand Up @@ -207,7 +207,7 @@ public interface GenericVisitor<R, A> {
@Generated("com.github.javaparser.generator.core.visitor.GenericVisitorGenerator")
R visit(MemberValuePair n, A arg);

//- Statements ----------------------------------------
// - Statements ----------------------------------------
@Generated("com.github.javaparser.generator.core.visitor.GenericVisitorGenerator")
R visit(ExplicitConstructorInvocationStmt n, A arg);

Expand Down

0 comments on commit 26b23bc

Please sign in to comment.