aboutsummaryrefslogtreecommitdiff
path: root/src/parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.y')
-rw-r--r--src/parser.y7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/parser.y b/src/parser.y
index a87b6c6..edf71c1 100644
--- a/src/parser.y
+++ b/src/parser.y
@@ -45,6 +45,7 @@
%token LBRACE "{"
%token RBRACE "}"
%token SEMICOLON ";"
+%token BACKSLASH "\\"
%token NL "nl"
%nterm <ast> arg args rev_args
@@ -101,8 +102,12 @@ arg
| INT {$$ = gen_int($1);}
| FLOAT {$$ = gen_float($1);}
+cont
+ : BACKSLASH NL
+
rev_args
- : rev_args arg {$$ = $1; vect_append(struct lyn_value, $$.args, &$2);}
+ : rev_args cont arg {$$ = $1; vect_append(struct lyn_value, $$.args, &$3);}
+ | rev_args arg {$$ = $1; vect_append(struct lyn_value, $$.args, &$2);}
| arg {$$ = gen_list(); vect_append(struct lyn_value, $$.args, &$1);}
args