diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-02-13 02:58:57 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-02-13 02:58:57 -0800 |
commit | f31be2486084f6388ea212f18574584ab4c13e64 (patch) | |
tree | a0d22b9fa99ff8067137de7aa83a8d7b064fc9c8 /parser.y | |
parent | b970b2caac831c73078d2cee125e717124dff150 (diff) | |
download | txr-f31be2486084f6388ea212f18574584ab4c13e64.tar.gz txr-f31be2486084f6388ea212f18574584ab4c13e64.tar.bz2 txr-f31be2486084f6388ea212f18574584ab4c13e64.zip |
* eval.c (subst_vars): Handle lone symbols (not wrapped
in sys::var form) as variables. This allows interpretation of metanums
in quasiliterals, because these are replaced by variables in the
op expander.
* parser.l: Recognize METANUM in QSILIT state.
* parser.y (quasi_item): METANUM parsed in quasiliteral.
* txr.vim: Metanums highlighted properly.
Diffstat (limited to 'parser.y')
-rw-r--r-- | parser.y | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -833,6 +833,8 @@ quasi_items : quasi_item { $$ = cons($1, nil); } quasi_item : litchars { $$ = lit_char_helper($1); } | TEXT { $$ = string_own($1); } | o_var { $$ = $1; } + | METANUM { $$ = cons(var_s, cons($1, nil)); + rl($$, num(lineno)); } | list { $$ = rlcp(cons(expr_s, expand($1)), $1); } ; |