• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1" Vim syntax file
2" Language: Amber Script
3
4if exists("b:current_syntax")
5  finish
6endif
7
8" Regular int like number with - + or nothing in front
9syn match amberNumber '\d\+' contained display
10syn match amberNumber '[-+]\d\+' contained display
11
12" Floating point number with decimal no E or e (+,-)
13syn match amberNumber '\d\+\.\d*' contained display
14syn match amberNumber '[-+]\d\+\.\d*' contained display
15
16" Floating point like number with E and no decimal point (+,-)
17syn match amberNumber '[-+]\=\d[[:digit:]]*[eE][\-+]\=\d\+' contained display
18syn match amberNumber '\d[[:digit:]]*[eE][\-+]\=\d\+' contained display
19
20" Floating point like number with E and decimal point (+,-)
21syn match amberNumber '[-+]\=\d[[:digit:]]*\.\d*[eE][\-+]\=\d\+' contained display
22syn match amberNumber '\d[[:digit:]]*\.\d*[eE][\-+]\=\d\+' contained display
23
24syn region amberString start='"' end='"' contained
25syn region amberDesc start='"' end='"'
26
27syn keyword amberTodo contained TODO FIXME
28syn match amberBang "\v#!.*$"
29syn match amberComment "#.*$" contains=amberTodo
30
31syn keyword amberBlockCmd SHADER BUFFER PIPELINE ATTACH END RUN TYPE SIZE FILL
32syn keyword amberBlockCmd DESCRIPTOR_SET BINDING IDX TO EXPECT PASSTHROUGH
33syn keyword amberBlockCmd DATA_TYPE DATA SERIES_FROM DRAW_ARRAY IN START_IDX
34syn keyword amberBlockCmd COUNT CLEAR CLEAR_COLOR AS POS DRAW_RECT INC_BY
35syn keyword amberBlockCmd FRAMEBUFFER ENTRY_POINT SHADER_OPTIMIZATION
36syn keyword amberBlockCmd FORMAT FRAMEBUFFER_SIZE LOCATION BIND SAMPLER
37syn keyword amberBlockCmd VERTEX_DATA INDEX_DATA INDEXED IMAGE_ATTACHMENT
38syn keyword amberBlockCmd DEPTH_STENCIL_ATTACHMENT DEVICE_FEATURE TOLERANCE
39syn keyword amberBlockCmd REPEAT COPY DERIVE_PIPELINE FROM STD140 STD430
40syn keyword amberBlockCmd DEVICE_EXTENSION IMAGE INSTANCE_EXTENSION SET
41syn keyword amberBlockCmd STRUCT VIRTUAL_FILE CLEAR_DEPTH CLEAR_STENCIL
42syn keyword amberBlockCmd DEBUG TARGET_ENV SHADER_OPTIMIZATION COMPILE_OPTIONS
43syn keyword amberBlockCmd POLYGON_MODE DEPTH STENCIL SUBGROUP SPECIALIZE
44syn keyword amberBlockCmd FULLY_POPULATED VARYING_SIZE REQUIRED_SIZE
45syn keyword amberBlockCmd MIN MAX BUFFER_ARRAY SAMPLER_ARRAY KERNEL OFFSET
46syn keyword amberBlockCmd BASE_MIP_LEVEL ARG_NUMBER RATE TEST CLAMP
47syn keyword amberBlockCmd WRITE COMPARE_OP BOUNDS BIAS FAIL_OP PASS_OP
48syn keyword amberBlockCmd DEPTH_FAIL_OP COMPARE_MASK WRITE_MASK REFERENCE
49syn keyword amberBlockCmd STRIDE ARRAY_STRIDE MATRIX_STRIDE MIP_LEVELS
50syn keyword amberBlockCmd FILE DIM_1D DIM_2D DIM_3D WIDTH HEIGHT SAMPLES
51syn keyword amberBlockCmd TEXT BINARY PNG DRAW_GRID CELLS INSTANCE_COUNT
52syn keyword amberBlockCmd START_INSTANCE THREAD GLOBAL_INVOCATION_ID
53syn keyword amberBlockCmd VERTEX_INDEX FRAGMENT_WINDOW_SPACE_POSITION
54syn keyword amberBlockCmd CALLSTACK STEP_IN STEP_OUT STEP_OVER CONTINUE TO
55syn keyword amberBlockCmd ENGINE_DATA MAG_FILTER MIN_FILTER ADDRESS_MODE_U
56syn keyword amberBlockCmd ADDRESS_MODE_V ADDRESS_MODE_W BORDER_COLOR
57syn keyword amberBlockCmd MIN_LOD MAX_LOD NORMALIZED_COORDS UNNORMALIZED_COORDS
58syn keyword amberBlockCmd ARG_NAME
59
60syn keyword amberComparator EQ NE LT LE GT GE EQ_RGB EQ_RGBA EQ_BUFFER RMSE_BUFFER
61syn keyword amberComparator EQ_HISTOGRAM_EMD_BUFFER
62
63syn keyword amberKeyword compute vertex geometry fragment graphics
64syn keyword amberKeyword tessellation_evaulation tessellation_control multi
65
66syn keyword amberFormat GLSL HLSL SPIRV-ASM SPIRV-HEX OPENCL-C
67
68syn keyword amberTopology point_list line_list line_list_with_adjacency
69syn keyword amberTopology line_strip line_strip_with_adjacency triangle_list
70syn keyword amberTopology triangle_list_with_adjacench triangle_strip
71syn keyword amberTopology triangle_strip_with_adjacency triangle_fan patch_list
72
73syn keyword amberBufferType uniform storage push_constant color depth_stencil
74syn keyword amberBufferType uniform_dynamic storage_dynamic combined_image_sampler
75syn keyword amberBufferType storage_image sampled_image uniform_texel_buffer
76syn keyword amberBufferType storage_texel_buffer
77
78syn keyword amberAddressMode repeat mirrored_repeat clamp_to_edge clamp_to_border
79syn keyword amberAddressMode mirror_clamp_to_edge
80
81syn keyword amberCompareOp never less equal less_or_equal greater not_equal
82syn keyword amberCompareOp greater_or_equal always
83
84syn keyword amberStencilOp keep zero replace increment_and_clamp decrement_and_clamp
85syn keyword amberStencilOp invert increment_and_wrap decrement_and_wrap
86
87syn keyword amberBorderColor float_transparent_black int_transparent_black
88syn keyword amberBorderColor float_opaque_black int_opaque_black float_opaque_white
89syn keyword amberBorderColor int_opaque_white
90
91syn keyword amberFace front back front_and_back
92
93syn keyword amberFilter nearest linear
94
95syn keyword amberPolygonMode fill line point
96
97let b:current_syntax = "amber"
98hi def link amberTodo Todo
99hi def link amberBang Comment
100hi def link amberComment Comment
101hi def link amberBlockCmd Keyword
102hi def link amberString String
103hi def link amberNumber Number
104hi def link amberDesc PreProc
105hi def link amberKeyword String
106hi def link amberFormat Type
107hi def link amberComparator Keyword
108hi def link amberTopology Type
109hi def link amberBufferType Type
110hi def link amberAddressMode Type
111hi def link amberCompareOp Type
112hi def link amberStencilOp Type
113hi def link amberBorderColor Type
114hi def link amberFace Type
115hi def link amberFilter Type
116hi def link amberPolygonMode Type
117