| 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 current_cpu current_os current_toolchain | 19 syn keyword gnPredefVar current_cpu current_os current_toolchain |
| 20 syn keyword gnPredefVar default_toolchain host_cpu host_os | 20 syn keyword gnPredefVar default_toolchain host_cpu host_os |
| 21 syn keyword gnPredefVar root_build_dir root_gen_dir root_out_dir | 21 syn keyword gnPredefVar root_build_dir root_gen_dir root_out_dir |
| 22 syn keyword gnPredefVar target_cpu target_gen_dir 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 target_os |
| 24 syn keyword gnPredefVar true false | 24 syn keyword gnPredefVar true false |
| 25 hi def link gnPredefVar Constant | 25 hi def link gnPredefVar Constant |
| 26 | 26 |
| 27 " Target declarations | 27 " Target declarations |
| 28 syn keyword gnTarget action action_foreach copy executable group | 28 syn keyword gnTarget action action_foreach copy executable group |
| 29 syn keyword gnTarget shared_library source_set static_library | 29 syn keyword gnTarget shared_library source_set static_library |
| 30 syn keyword gnTarget loadable_module |
| 30 hi def link gnTarget Type | 31 hi def link gnTarget Type |
| 31 | 32 |
| 32 " Buildfile functions | 33 " Buildfile functions |
| 33 syn keyword gnFunctions assert config declare_args defined exec_script | 34 syn keyword gnFunctions assert config declare_args defined exec_script |
| 34 syn keyword gnFunctions foreach get_label_info get_path_info | 35 syn keyword gnFunctions foreach get_label_info get_path_info |
| 35 syn keyword gnFunctions get_target_outputs getenv import print | 36 syn keyword gnFunctions get_target_outputs getenv import print |
| 36 syn keyword gnFunctions process_file_template read_file rebase_path | 37 syn keyword gnFunctions process_file_template read_file rebase_path |
| 37 syn keyword gnFunctions set_default_toolchain set_defaults | 38 syn keyword gnFunctions set_default_toolchain set_defaults |
| 38 syn keyword gnFunctions set_sources_assignment_filter template tool | 39 syn keyword gnFunctions set_sources_assignment_filter template tool |
| 39 syn keyword gnFunctions toolchain toolchain_args write_file | 40 syn keyword gnFunctions toolchain toolchain_args write_file |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 "syn match gnOperator /-=/ | 73 "syn match gnOperator /-=/ |
| 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 "syn match gnOperator /\s-\s/ | 77 "syn match gnOperator /\s-\s/ |
| 77 "hi def link gnOperator Operator | 78 "hi def link gnOperator Operator |
| 78 | 79 |
| 79 syn sync minlines=500 | 80 syn sync minlines=500 |
| 80 | 81 |
| 81 let b:current_syntax = "gn" | 82 let b:current_syntax = "gn" |
| OLD | NEW |