parent
8468559e7f
commit
77d6d64602
|
@ -77,7 +77,7 @@ CaseGrammar.rules = [
|
|||
|
||||
TestGrammar.rules = [
|
||||
PatternRule(r'spaces', r' +'),
|
||||
PatternRule(r'sh_builtin', r"(?<![-a-zA-Z0-9_])(?:source|alias|bg|bind|break|builtin|cd|command|compgen|complete|declare|dirs|disown|echo|enable|eval|exec|exit|export|fc|fg|getops|hash|help|history|jobs|kill|let|local|logout|popd|printf|pushd|pwd|readonly|read|return|set|shift|shopt|suspend|test|times|trap|type|ulimit|umask|unalias|unset|wait)(?![a-zA-Z0-9_=/])"),
|
||||
PatternRule(r'sh_builtin', r"(?<![-a-zA-Z0-9_=/])(?:source|alias|bg|bind|break|builtin|cd|command|compgen|complete|declare|dirs|disown|echo|enable|eval|exec|exit|export|fc|fg|getops|hash|help|history|jobs|kill|let|local|logout|popd|printf|pushd|pwd|readonly|read|return|set|shift|shopt|suspend|times|trap|type|ulimit|umask|unalias|unset|wait)(?![a-zA-Z0-9_=/])"),
|
||||
PatternRule(r'sh_reserved', r"(?:done|do|elif|else|esac|fi|for|function|if|in|select|then|until|while|time)(?![a-zA-Z0-9_=/])"),
|
||||
PatternRule(r'binop', r'==|=|!='),
|
||||
PatternRule(r'binop', r'-(?:nt|ot|ef|eq|ne|lt|gt|le|ge)(?!' + char + ')'),
|
||||
|
@ -85,7 +85,7 @@ TestGrammar.rules = [
|
|||
PatternRule(r'continuation', r'\\\n$'),
|
||||
PatternRule(r'redirect', r'<|>'),
|
||||
PatternRule(r'delimiter', r";;|[();{}|&><]"),
|
||||
RegionRule(r'test', r'test(?![a-zA-Z0-9_=/])', None, r';|\n'),
|
||||
RegionRule(r'test', r'(?<![^ \t])test(?![a-zA-Z0-9_=/])', None, r';|\n'),
|
||||
RegionRule(r'test2', r'\[\[', None, r'\]\]'),
|
||||
RegionRule(r'test3', r'\[', None, r'\]'),
|
||||
RegionRule(r'eval', r'`', EvalGrammar, r'`'),
|
||||
|
@ -114,7 +114,7 @@ ShGrammar.rules = [
|
|||
PatternRule(r'sh_reserved', r"(?:done|do|elif|else|esac|fi|for|function|if|in|select|then|until|while|time)(?![a-zA-Z0-9_=/])"),
|
||||
RegionRule(r'case', r'case', None, 'in', CaseGrammar, r'esac'),
|
||||
PatternRule(r'sh_builtin', r"(?<![-a-zA-Z0-9_])(?:source|alias|bg|bind|break|builtin|cd|command|compgen|complete|declare|dirs|disown|echo|enable|eval|exec|exit|export|fc|fg|getops|hash|help|history|jobs|kill|let|local|logout|popd|printf|pushd|pwd|readonly|read|return|set|shift|shopt|suspend|times|trap|type|ulimit|umask|unalias|unset|wait)(?![a-zA-Z0-9_=/])(?![-a-zA-Z0-9_])"),
|
||||
RegionRule(r'test', r'test', TestGrammar, r';|\n'),
|
||||
RegionRule(r'test', r'(?<![^ \t])test(?![a-zA-Z0-9_=/])', TestGrammar, r';|\n'),
|
||||
RegionRule(r'test2', r'\[\[', TestGrammar, r'\]\]'),
|
||||
RegionRule(r'test3', r'\[', TestGrammar, r'\]'),
|
||||
PatternRule(r'redirect', r'<|>'),
|
||||
|
|
Loading…
Reference in New Issue