projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Macro arguments and the !length function work.
[pspp]
/
src
/
language
/
lexer
/
macro.h
diff --git
a/src/language/lexer/macro.h
b/src/language/lexer/macro.h
index 8b0a7bb1adeec81fb707d72c70e2982cd918c944..ba0f1fe735df4f36a8f989b6d6b94443ec6e0c02 100644
(file)
--- a/
src/language/lexer/macro.h
+++ b/
src/language/lexer/macro.h
@@
-28,7
+28,8
@@
struct macro_expander;
struct macro_param
{
struct macro_param
{
- char *name; /* NULL for a positional parameter. */
+ bool positional; /* Is this a positional parameter? */
+ char *name; /* "!1" or "!name". */
struct tokens def; /* Default expansion. */
bool expand_arg; /* Macro-expand the argument? */
struct tokens def; /* Default expansion. */
bool expand_arg; /* Macro-expand the argument? */
@@
-57,6
+58,7
@@
struct macro
size_t n_params;
struct substring body;
size_t n_params;
struct substring body;
+ struct tokens body_tokens;
};
void macro_destroy (struct macro *);
};
void macro_destroy (struct macro *);