Search in sources :

Example 1 with ApexParserOptions

use of net.sourceforge.pmd.lang.apex.ApexParserOptions in project pmd by pmd.

the class ApexCompilerSoqlTest method testSoqlCompilation.

@Test
public void testSoqlCompilation() {
    ApexParser parser = new ApexParser(new ApexParserOptions());
    ApexNode<Compilation> cu = parser.parse(new StringReader(CODE));
    Assert.assertNotNull(cu);
}
Also used : Compilation(apex.jorje.semantic.ast.compilation.Compilation) ApexParserOptions(net.sourceforge.pmd.lang.apex.ApexParserOptions) StringReader(java.io.StringReader) Test(org.junit.Test)

Example 2 with ApexParserOptions

use of net.sourceforge.pmd.lang.apex.ApexParserOptions in project pmd by pmd.

the class ApexParserTestHelpers method parse.

public static ApexNode<Compilation> parse(String code) {
    ApexParser parser = new ApexParser(new ApexParserOptions());
    Reader reader = new StringReader(code);
    return parser.parse(reader);
}
Also used : ApexParserOptions(net.sourceforge.pmd.lang.apex.ApexParserOptions) StringReader(java.io.StringReader) StringReader(java.io.StringReader) Reader(java.io.Reader)

Aggregations

StringReader (java.io.StringReader)2 ApexParserOptions (net.sourceforge.pmd.lang.apex.ApexParserOptions)2 Compilation (apex.jorje.semantic.ast.compilation.Compilation)1 Reader (java.io.Reader)1 Test (org.junit.Test)1