From 39b28980f38e83e15cdeb19a489b5659af97fe93 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 18 Jun 2015 14:54:41 +0100 Subject: various posts: Implement assignment parsing for typeset. Typeset assignments now work like raw assignments except for no "+=" and no GLOB_ASSIGN. Documented in typeset builtin doc and mentioned in release notes. Tests to ensure basic sanity. Enabled by default, can be turned off by "disable -r" with typeset family of commands. --- Src/hashtable.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Src/hashtable.c') diff --git a/Src/hashtable.c b/Src/hashtable.c index 2b5524999..90739a882 100644 --- a/Src/hashtable.c +++ b/Src/hashtable.c @@ -1050,22 +1050,29 @@ static struct reswd reswds[] = { {{NULL, "}", 0}, OUTBRACE}, {{NULL, "case", 0}, CASE}, {{NULL, "coproc", 0}, COPROC}, + {{NULL, "declare", 0}, TYPESET}, {{NULL, "do", 0}, DOLOOP}, {{NULL, "done", 0}, DONE}, {{NULL, "elif", 0}, ELIF}, {{NULL, "else", 0}, ELSE}, {{NULL, "end", 0}, ZEND}, {{NULL, "esac", 0}, ESAC}, + {{NULL, "export", 0}, TYPESET}, {{NULL, "fi", 0}, FI}, + {{NULL, "float", 0}, TYPESET}, {{NULL, "for", 0}, FOR}, {{NULL, "foreach", 0}, FOREACH}, {{NULL, "function", 0}, FUNC}, {{NULL, "if", 0}, IF}, + {{NULL, "integer", 0}, TYPESET}, + {{NULL, "local", 0}, TYPESET}, {{NULL, "nocorrect", 0}, NOCORRECT}, + {{NULL, "readonly", 0}, TYPESET}, {{NULL, "repeat", 0}, REPEAT}, {{NULL, "select", 0}, SELECT}, {{NULL, "then", 0}, THEN}, {{NULL, "time", 0}, TIME}, + {{NULL, "typeset", 0}, TYPESET}, {{NULL, "until", 0}, UNTIL}, {{NULL, "while", 0}, WHILE}, {{NULL, NULL, 0}, 0} -- cgit 1.4.1