diff options
author | 2007-04-22 19:50:26 +1000 | |
---|---|---|
committer | 2007-04-22 19:50:26 +1000 | |
commit | 45412f2b1f9b1b97fce85533a9d3fe0309e5c090 (patch) | |
tree | 2267da7a24656d95161a900e4a71fceb27df9f94 /highlight.c | |
parent | e9790db64a642bedb7c359c634e84980e523e627 (diff) |
Move keyword detection code to separate file
darcs-hash:20070422095026-ac50b-77a840e2830370f46b7a48fd8863095d2cd7a5f0.gz
Diffstat (limited to 'highlight.c')
-rw-r--r-- | highlight.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/highlight.c b/highlight.c index 47d1ad74..f09ff805 100644 --- a/highlight.c +++ b/highlight.c @@ -22,6 +22,7 @@ #include "proc.h" #include "parser.h" #include "parse_util.h" +#include "parser_keywords.h" #include "builtin.h" #include "function.h" #include "env.h" @@ -642,7 +643,7 @@ void highlight_shell( wchar_t * buff, int mark = tok_get_pos( &tok ); color[ tok_get_pos( &tok ) ] = HIGHLIGHT_COMMAND; - if( parser_is_subcommand( cmd ) ) + if( parser_keywords_is_subcommand( cmd ) ) { int sw; @@ -662,9 +663,9 @@ void highlight_shell( wchar_t * buff, tok_next( &tok ); - sw = parser_is_switch( tok_last( &tok ) ); + sw = parser_keywords_is_switch( tok_last( &tok ) ); - if( !parser_is_block( cmd ) && + if( !parser_keywords_is_block( cmd ) && sw == ARG_SWITCH ) { /* |