• R/O
  • SSH

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision07a60acffe6c28f1f1d778f7067f19c73f5921f6 (tree)
Zeit2015-11-13 07:17:47
AutorMirrgieRiana
CommiterMirrgieRiana

Log Message

test.libr: add: TokenCallFunction

Ändern Zusammenfassung

Diff

diff -r 5b26d5afddd8 -r 07a60acffe6c projects/mirrg.game.math.wulfenite/src/main/java/mirrg/game/math/wulfenite/script2/tnode/TNodes.java
--- a/projects/mirrg.game.math.wulfenite/src/main/java/mirrg/game/math/wulfenite/script2/tnode/TNodes.java Fri Nov 13 07:17:04 2015 +0900
+++ b/projects/mirrg.game.math.wulfenite/src/main/java/mirrg/game/math/wulfenite/script2/tnode/TNodes.java Fri Nov 13 07:17:47 2015 +0900
@@ -329,18 +329,14 @@
329329
330330 }
331331
332- public static class Function extends TNodeBase implements ITNodeExpression
332+ public static class TokenCallFunction extends TNodeBase
333333 {
334334
335335 public TokenIdentifier identifier;
336336 public Operation arguments;
337337
338- public ITNodeExpression call;
339-
340- @Override
341- public boolean validate(ArgumentsValidate argumentsValidate)
338+ public ITNodeExpression[] getExpressions()
342339 {
343-
344340 ITNodeExpression[] expressions;
345341 if (arguments == null) {
346342 expressions = new ITNodeExpression[0];
@@ -352,8 +348,23 @@
352348 expressions[i] = expression;
353349 }
354350 }
351+ return expressions;
352+ }
355353
356- call = new Call(identifier.nodes, identifier.node.string.string, expressions);
354+ }
355+
356+ public static class Function extends TNodeBase implements ITNodeExpression
357+ {
358+
359+ public TokenCallFunction token;
360+
361+ public ITNodeExpression call;
362+
363+ @Override
364+ public boolean validate(ArgumentsValidate argumentsValidate)
365+ {
366+ ITNodeExpression[] expressions = token.getExpressions();
367+ call = new Call(token.identifier.nodes, token.identifier.node.string.string, expressions);
357368
358369 if (!call.validate(argumentsValidate)) return false;
359370
diff -r 5b26d5afddd8 -r 07a60acffe6c projects/mirrg.game.math.wulfenite/src/main/resources/mirrg/game/math/wulfenite/script2/tnode/test.libr
--- a/projects/mirrg.game.math.wulfenite/src/main/resources/mirrg/game/math/wulfenite/script2/tnode/test.libr Fri Nov 13 07:17:04 2015 +0900
+++ b/projects/mirrg.game.math.wulfenite/src/main/resources/mirrg/game/math/wulfenite/script2/tnode/test.libr Fri Nov 13 07:17:47 2015 +0900
@@ -19,16 +19,16 @@
1919 TokenInteger := Comments <radix>=IntegerUnsigned 'x' <string>="[0-9a-zA-Z]+" : <TokenInteger>;
2020 TokenReal := Comments <node>=Real : <TokenReal>;
2121 TokenImaginary := Comments <node>=Imaginary : <TokenImaginary>;
22+TokenCallFunction := <identifier>=TokenIdentifier
23+ Comments '('
24+ <arguments>=?[Expression,
25+ Comments ','
26+ ]
27+ Comments ')' : <TokenCallFunction>;
2228
2329 // ■因子
2430 Variable := <identifier>=TokenIdentifier : <Variable>;
25-Function := <identifier>=TokenIdentifier
26- Comments '('
27- <arguments>=?[Expression,
28- Comments ','
29- ]
30- Comments ')'
31- : <Function>;
31+Function := <token>=TokenCallFunction : <Function>;
3232 LiteralNumeric := <token>=( TokenDecimal
3333 | TokenInteger
3434 | TokenReal