mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-08 00:36:15 +00:00
parse things in a less dumb way
This commit is contained in:
@@ -16,7 +16,7 @@ import java.util.List;
|
||||
public class ParserTest {
|
||||
@Test
|
||||
public void parse() throws IOException, ParseException {
|
||||
Parser parser = new Parser(IOUtils.toString(getClass().getResourceAsStream("/target/server/plugins/Terra/test.tesf")));
|
||||
Parser parser = new Parser(IOUtils.toString(getClass().getResourceAsStream("/test.tesf")));
|
||||
|
||||
parser.addFunction("test", new FunctionBuilder<Test1>() {
|
||||
@Override
|
||||
|
||||
8
common/src/test/resources/test.tesf
Normal file
8
common/src/test/resources/test.tesf
Normal file
@@ -0,0 +1,8 @@
|
||||
test("hello", 2);
|
||||
|
||||
if(test("fsdfsdf", 3) == 2) {
|
||||
test("fdsgdf", 3.4);
|
||||
if(test("fsdfsdf", 3) == 2) {
|
||||
test("fdsgdf", 3.4);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user