You may search meson tmlanguage
on google. As for build system
Derived from https://github.com/TingPing/language-meson/blob/master/grammars/meson.json
Meson.sublime-syntax:
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
# Derived from https://github.com/TingPing/language-meson/blob/master/grammars/meson.json
name: Meson
file_extensions:
- meson.build
- meson_options.txt
scope: source.meson
contexts:
main:
- match: \#.*$
scope: comment.line.meson
- include: string_quoted_single
- match: \b(if|else|elif|endif|foreach|endforeach)\b
scope: keyword.control.flow.meson
- match: \b(and|not|or)\b
scope: keyword.operator.logical.meson
- match: \b(true|false)\b
scope: constant.language.meson
- match: '\b([1-9]+[0-9]*\.[0-9]*)'
scope: constant.numeric.float.meson
- match: '\b(?i:(0x[0-9a-f]+))'
scope: constant.numeric.integer.hexadecimal.meson
- match: '\b([1-9]+[0-9]*|0)'
scope: constant.numeric.integer.decimal.meson
- match: \b(meson|host_machine|build_machine|target_machine)\b
scope: support.variable.meson
- match: '\b([\w_]+)\s*(?=:)'
scope: variable.parameter.function.keyword.meson
- match: <\=|>\=|\=\=|<|>|\!\=
scope: keyword.operator.comparison.meson
- match: \+\=
scope: keyword.operator.assignment.augmented.meson
- match: \=
scope: keyword.operator.assignment.meson
- match: \+|\-|\*|%|\/
scope: keyword.operator.arithmetic.meson
- match: |-
(?x)\b(add_global_arguments|add_project_arguments|add_global_link_arguments|add_project_link_arguments|add_test_setup|add_languages|alias_target|assert|benchmark|both_libraries|build_target|configuration_data|configure_file|custom_target|declare_dependency|dependency|disabler|environment|error|executable|generator|gettext|get_option|get_variable|files|find_library|find_program|include_directories|import|install_data|install_headers|install_man|install_subdir|is_disabler|is_variable|jar|join_paths|library|message|option|project|run_target|run_command|set_variable|subdir|subdir_done|subproject|summary|shared_library|shared_module|static_library|test|vcs_tag|warning
)\b\s*(?=\()
scope: support.function.builtin.meson
constant_placeholder:
- match: '(?i:(%(\([a-z_]+\))?#?0?\-?[ ]?\+?([0-9]*|\*)(\.([0-9]*|\*))?([hL][a-z]|[a-z%]))|(\{([!\[\].:\w ]+)?\}))'
scope: constant.other.placeholder.meson
escaped_character:
- match: ((\\\n)|(\\\\)|(\\')|(\\n)|(\\r)|(\\t))
captures:
1: constant.character.escape.newline.meson
2: constant.character.escape.backlash.meson
3: constant.character.escape.single-quote.meson
4: constant.character.escape.linefeed.meson
5: constant.character.escape.return.meson
6: constant.character.escape.tab.meson
string_quoted_single:
- match: (?<!')(')(('))(?!')
scope: string.quoted.single.single-line.meson
captures:
1: puncutation.definition.string.begin.meson
2: puncutation.definition.string.end.meson
3: meta.empty-string.single.meson
- match: (''')
captures:
1: punctuation.definition.string.begin.meson
push:
- meta_scope: string.quoted.single.block.meson
- match: ((?<=''')(')''|''')
captures:
1: punctuation.definition.string.end.meson
2: meta.empty-string.single.meson
pop: true
- include: constant_placeholder
- include: escaped_character
- match: (')
captures:
1: punctuation.definition.string.begin.meson
push:
- meta_scope: string.quoted.single.single-line.meson
- match: (')|(\n)
captures:
1: punctuation.definition.string.end.meson
2: invalid.illegal.unclosed-string.meson
pop: true
- include: constant_placeholder
- include: escaped_character