Skip to content

Commit 56879dc

Browse files
authored
Merge pull request #5 from OGL-Development/1.0
1.0
2 parents a3a37bf + a7753bc commit 56879dc

23 files changed

+1233
-997
lines changed

.idea/misc.xml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@
5050
<artifactId>reflections</artifactId>
5151
<version>0.9.12</version>
5252
</dependency>
53-
<dependency>
54-
<groupId>org.jetbrains</groupId>
55-
<artifactId>annotations</artifactId>
56-
<version>1.0-SNAPSHOT</version>
57-
<scope>compile</scope>
58-
</dependency>
5953

6054
</dependencies>
6155

src/main/java/org/luapp/language/Main.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ public class Main {
1010

1111

1212
public static void main(String[] args){
13-
String path = System.getProperty("user.dir") + "/src/main/java/org/luapp/language/test.lpp";
13+
String path = args[0];//System.getProperty("user.dir") + "/src/main/java/org/luapp/language/test.lpp";
1414
Main.luaPPInstance = new Luapp(path);
1515
Main.luaPPInstance.load();
1616
}
17+
1718
public static String readPath(String path){
1819
try {
1920
File myObj = new File(path);

src/main/java/org/luapp/language/generator/luapp.interp

Lines changed: 4 additions & 1 deletion
Large diffs are not rendered by default.

src/main/java/org/luapp/language/generator/luapp.tokens

Lines changed: 60 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,19 @@ T__62=63
6464
T__63=64
6565
T__64=65
6666
T__65=66
67-
NAME=67
68-
NORMALSTRING=68
69-
CHARSTRING=69
70-
LONGSTRING=70
71-
INT=71
72-
HEX=72
73-
FLOAT=73
74-
HEX_FLOAT=74
75-
COMMENT=75
76-
LINE_COMMENT=76
77-
WS=77
78-
SHEBANG=78
67+
T__66=67
68+
NAME=68
69+
NORMALSTRING=69
70+
CHARSTRING=70
71+
LONGSTRING=71
72+
INT=72
73+
HEX=73
74+
FLOAT=74
75+
HEX_FLOAT=75
76+
COMMENT=76
77+
LINE_COMMENT=77
78+
WS=78
79+
SHEBANG=79
7980
';'=1
8081
'='=2
8182
'break'=3
@@ -96,49 +97,50 @@ SHEBANG=78
9697
'class'=18
9798
'extends'=19
9899
'local'=20
99-
'return'=21
100-
'::'=22
101-
'.'=23
102-
':'=24
103-
'nil'=25
104-
'false'=26
105-
'true'=27
106-
'...'=28
107-
'('=29
108-
')'=30
109-
'['=31
110-
']'=32
111-
'{'=33
112-
'}'=34
113-
'or'=35
114-
'and'=36
115-
'<'=37
116-
'>'=38
117-
'<='=39
118-
'>='=40
119-
'~='=41
120-
'=='=42
121-
'..'=43
122-
'+'=44
123-
'-'=45
124-
'*'=46
125-
'/'=47
126-
'%'=48
127-
'//'=49
128-
'&'=50
129-
'|'=51
130-
'~'=52
131-
'<<'=53
132-
'>>'=54
133-
'not'=55
134-
'#'=56
135-
'^'=57
136-
'new'=58
137-
'get'=59
138-
'set'=60
139-
'constructor'=61
140-
'++'=62
141-
'+='=63
142-
'*='=64
143-
'/='=65
144-
'-='=66
100+
'safe'=21
101+
'return'=22
102+
'::'=23
103+
'.'=24
104+
':'=25
105+
'nil'=26
106+
'false'=27
107+
'true'=28
108+
'...'=29
109+
'('=30
110+
')'=31
111+
'['=32
112+
']'=33
113+
'{'=34
114+
'}'=35
115+
'or'=36
116+
'and'=37
117+
'<'=38
118+
'>'=39
119+
'<='=40
120+
'>='=41
121+
'~='=42
122+
'=='=43
123+
'..'=44
124+
'+'=45
125+
'-'=46
126+
'*'=47
127+
'/'=48
128+
'%'=49
129+
'//'=50
130+
'&'=51
131+
'|'=52
132+
'~'=53
133+
'<<'=54
134+
'>>'=55
135+
'not'=56
136+
'#'=57
137+
'^'=58
138+
'new'=59
139+
'get'=60
140+
'set'=61
141+
'constructor'=62
142+
'++'=63
143+
'+='=64
144+
'*='=65
145+
'/='=66
146+
'-='=67

src/main/java/org/luapp/language/generator/luappBaseListener.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Generated from C:/Users/Harry/Desktop/Lua/lpp/src/main/java/org/luapp/language/parser\luapp.g4 by ANTLR 4.8
1+
// Generated from C:/Users/Harry/Desktop/Lua/lua-plus-plus/src/main/java/org/luapp/language/parser\luapp.g4 by ANTLR 4.8
22
package org.luapp.language.generator;
33

44
import org.antlr.v4.runtime.ParserRuleContext;
@@ -611,6 +611,18 @@ public class luappBaseListener implements luappListener {
611611
* <p>The default implementation does nothing.</p>
612612
*/
613613
@Override public void exitMinusEqual(luappParser.MinusEqualContext ctx) { }
614+
/**
615+
* {@inheritDoc}
616+
*
617+
* <p>The default implementation does nothing.</p>
618+
*/
619+
@Override public void enterSafeOperator(luappParser.SafeOperatorContext ctx) { }
620+
/**
621+
* {@inheritDoc}
622+
*
623+
* <p>The default implementation does nothing.</p>
624+
*/
625+
@Override public void exitSafeOperator(luappParser.SafeOperatorContext ctx) { }
614626

615627
/**
616628
* {@inheritDoc}

src/main/java/org/luapp/language/generator/luappBaseVisitor.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Generated from C:/Users/Harry/Desktop/Lua/lpp/src/main/java/org/luapp/language/parser\luapp.g4 by ANTLR 4.8
1+
// Generated from C:/Users/Harry/Desktop/Lua/lua-plus-plus/src/main/java/org/luapp/language/parser\luapp.g4 by ANTLR 4.8
22
package org.luapp.language.generator;
33
import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
44

@@ -361,4 +361,11 @@ public class luappBaseVisitor<T> extends AbstractParseTreeVisitor<T> implements
361361
* {@link #visitChildren} on {@code ctx}.</p>
362362
*/
363363
@Override public T visitMinusEqual(luappParser.MinusEqualContext ctx) { return visitChildren(ctx); }
364+
/**
365+
* {@inheritDoc}
366+
*
367+
* <p>The default implementation returns the result of calling
368+
* {@link #visitChildren} on {@code ctx}.</p>
369+
*/
370+
@Override public T visitSafeOperator(luappParser.SafeOperatorContext ctx) { return visitChildren(ctx); }
364371
}

src/main/java/org/luapp/language/generator/luappLexer.interp

Lines changed: 4 additions & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)