aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.h
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-12-14 23:40:25 +1000
committerGravatar axel <axel@liljencrantz.se>2006-12-14 23:40:25 +1000
commitc1945f8275fdf31220fcd8dccbf36d02e69278fa (patch)
treeba83ebe8ff90a0efb0d96a21852fa19a54d0b28d /parser.h
parent4d368dc06c75217c346c64d06ce3060395c720b5 (diff)
Minor highlighting tweaks to make highlighter handle switches to 'command' and 'builtin' builtins more correctly
darcs-hash:20061214134025-ac50b-e17f79d1d4d7594ab20a358296f84dbb6356f42b.gz
Diffstat (limited to 'parser.h')
-rw-r--r--parser.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/parser.h b/parser.h
index 7bf6b886..2fccf975 100644
--- a/parser.h
+++ b/parser.h
@@ -16,6 +16,17 @@
#define PARSER_TEST_INCOMPLETE 2
/**
+ REturn valuse for parser_is_switch()
+*/
+enum
+{
+ ARG_NON_SWITCH,
+ ARG_SWITCH,
+ ARG_SKIP
+}
+ ;
+
+/**
event_block_t represents a block on events of the specified type
*/
typedef struct event_block
@@ -221,6 +232,13 @@ void error( int ec, int p, const wchar_t *str, ... );
/**
+ Check if the specified argument is a switch. Return ARG_SWITCH if yes,
+ ARG_NON_SWITCH if no and ARG_SKIP if the argument is '--'
+*/
+int parser_is_switch( const wchar_t *cmd );
+
+
+/**
Tests if the specified commands parameters should be interpreted as another command, which will be true if the command is either 'command', 'exec', 'if', 'while' or 'builtin'.
\param cmd The command name to test