OLD | NEW |
1 " Copyright 2014 The Chromium Authors. All rights reserved. | 1 " Copyright 2014 The Chromium Authors. All rights reserved. |
2 " Use of this source code is governed by a BSD-style license that can be | 2 " Use of this source code is governed by a BSD-style license that can be |
3 " found in the LICENSE file. | 3 " found in the LICENSE file. |
4 " | 4 " |
5 " gn.vim: Vim syntax file for GN. | 5 " gn.vim: Vim syntax file for GN. |
6 " | 6 " |
7 " Quit when a (custom) syntax file was already loaded | 7 " Quit when a (custom) syntax file was already loaded |
8 "if exists("b:current_syntax") | 8 "if exists("b:current_syntax") |
9 "finish | 9 "finish |
10 "endif | 10 "endif |
11 | 11 |
12 syn case match | 12 syn case match |
13 | 13 |
14 " Keywords within functions | 14 " Keywords within functions |
15 syn keyword gnConditional if else | 15 syn keyword gnConditional if else |
16 hi def link gnConditional Conditional | 16 hi def link gnConditional Conditional |
17 | 17 |
18 " Predefined variables | 18 " Predefined variables |
19 syn keyword gnPredefVar build_cpu_arch build_os cpu_arch current_toolchain | 19 syn keyword gnPredefVar current_cpu current_os current_toolchain |
20 syn keyword gnPredefVar default_toolchain os python_path root_build_dir | 20 syn keyword gnPredefVar default_toolchain host_cpu host_os |
21 syn keyword gnPredefVar root_gen_dir root_out_dir target_gen_dir | 21 syn keyword gnPredefVar root_build_dir root_gen_dir root_out_dir |
22 syn keyword gnPredefVar target_out_dir | 22 syn keyword gnPredefVar target_cpu target_gen_dir target_out_dir |
| 23 syn keyword gnPredefVar target_os |
23 syn keyword gnPredefVar true false | 24 syn keyword gnPredefVar true false |
24 hi def link gnPredefVar Constant | 25 hi def link gnPredefVar Constant |
25 | 26 |
26 " Target declarations | 27 " Target declarations |
27 syn keyword gnTarget action action_foreach copy executable group | 28 syn keyword gnTarget action action_foreach copy executable group |
28 syn keyword gnTarget shared_library source_set static_library | 29 syn keyword gnTarget shared_library source_set static_library |
29 hi def link gnTarget Type | 30 hi def link gnTarget Type |
30 | 31 |
31 " Buildfile functions | 32 " Buildfile functions |
32 syn keyword gnFunctions assert config declare_args defined exec_script | 33 syn keyword gnFunctions assert config declare_args defined exec_script |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 "syn match gnOperator /-=/ | 72 "syn match gnOperator /-=/ |
72 "syn match gnOperator /\s>\s/ | 73 "syn match gnOperator /\s>\s/ |
73 "syn match gnOperator /\s<\s/ | 74 "syn match gnOperator /\s<\s/ |
74 "syn match gnOperator /\s+\s/ | 75 "syn match gnOperator /\s+\s/ |
75 "syn match gnOperator /\s-\s/ | 76 "syn match gnOperator /\s-\s/ |
76 "hi def link gnOperator Operator | 77 "hi def link gnOperator Operator |
77 | 78 |
78 syn sync minlines=500 | 79 syn sync minlines=500 |
79 | 80 |
80 let b:current_syntax = "gn" | 81 let b:current_syntax = "gn" |
OLD | NEW |