Permalink
Browse files

`で関数適用

f(g(h(a)));をf`g`h`a;と書ける
  • Loading branch information...
1 parent 087f5d8 commit 25039cbb26caa8cdf5eced37678ff0eea221c6b0 Silica committed Jun 11, 2012
Showing with 8 additions and 2 deletions.
  1. +6 −0 PSL/parser.h
  2. +2 −2 PSL/tokenizer.h
View
@@ -419,6 +419,12 @@ class Parser
Error(TINIA, 0, "member access (.)");
}
}
+ else if (n == '`')
+ {
+ t->getNext();
+ getexp13(c);
+ c.pushcode(new Variable::CALL);
+ }
else break;
}
}
View
@@ -446,13 +446,13 @@ class Tokenizer
case '?': return '?';
case ':': if (s[i] == '='){++i;return ASSIGN;}
return ':';
- case '"':string_literal(); return STRING;
case '$': return '$';
case '@': return '@';
+ case '`': return '`';
+ case '"':string_literal(); return STRING;
case '\'':string_literal('\'', false); return STRING;
// case '\\': return '\\';
-// case '`': return '`';
case '#': return preprocessor();
}

0 comments on commit 25039cb

Please sign in to comment.