diff options
author | Adrian Thurston <thurston@complang.org> | 2014-02-01 09:58:45 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2014-02-01 09:58:45 -0500 |
commit | 17b203380aa9f6fdf95afa6b129a664442a4bcc0 (patch) | |
tree | c1404f41696e9e62ed70e75dbc1237fe165fe130 | |
parent | fe82b38fb8ef979cd0b05776a262ea484161b46c (diff) | |
download | colm-17b203380aa9f6fdf95afa6b129a664442a4bcc0.tar.gz |
removed comma operator from expression lists
If comma is allowed there will likely be large amounts of code written with it
because it's so comon in other languages. It is only needed in a few cases, so
for those we can resort to other techniques, such as using parens around
expressions to isolate ('a') ('b'). This will prevent confusion when seeing
code with and without commas.
-rw-r--r-- | src/colm.lm | 2 | ||||
-rw-r--r-- | test/factor3.lm | 2 | ||||
-rw-r--r-- | test/ignore3.lm | 2 | ||||
-rw-r--r-- | test/pull2.lm | 2 |
4 files changed, 3 insertions, 5 deletions
diff --git a/src/colm.lm b/src/colm.lm index e5f1d6d1..e0ba8c71 100644 --- a/src/colm.lm +++ b/src/colm.lm @@ -268,7 +268,6 @@ def reference_type_ref def param_var_def_list [param_var_def param_var_def_list] -| [param_var_def COMMA param_var_def_list] | [] def param_var_def @@ -432,7 +431,6 @@ def optional_else def call_arg_list [code_expr call_arg_list] -| [code_expr COMMA call_arg_list] | [] def iter_call diff --git a/test/factor3.lm b/test/factor3.lm index 8d535880..cc988afb 100644 --- a/test/factor3.lm +++ b/test/factor3.lm @@ -1,3 +1,3 @@ ##### LM ##### -open( 'x', 'r' ) +open( 'x' ('r') ) ##### EXP ##### diff --git a/test/ignore3.lm b/test/ignore3.lm index d95f030a..ccf9c134 100644 --- a/test/ignore3.lm +++ b/test/ignore3.lm @@ -33,7 +33,7 @@ if ( ! Start ) { } for I: item in Start { - print( 'item: .' , I, '.\n' ) + print( 'item: .' I '.\n' ) if match I [ O: `( Inner: inner C: `) ] print( 'innr: .' O '.' Inner '.' C '.\n' ) } diff --git a/test/pull2.lm b/test/pull2.lm index 2ab3c9b4..7b50092d 100644 --- a/test/pull2.lm +++ b/test/pull2.lm @@ -1,5 +1,5 @@ ##### LM ##### -Stream: stream = open( 'working/pull2.in', 'r' ) +Stream: stream = open( 'working/pull2.in' ('r') ) String: str = Stream.pull( 10 ) print( String '\n' ) ##### IN ##### |