forked from WhileRomeBurns/VEX_Syntax
-
Notifications
You must be signed in to change notification settings - Fork 0
/
VEX.YAML-tmLanguage
75 lines (75 loc) · 8.77 KB
/
VEX.YAML-tmLanguage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
fileTypes:
- vfl
foldingStartMarker: (\{\s*(//.*)?$|^\s*// \{\{\{)
foldingStopMarker: ^\s*(\}|// \}\}\}$)
name: VEX
patterns:
- begin: \b(chop|cop2|cvex|displace|fog|image3d|light|pop|shadow|sop|surface)\b
beginCaptures:
'1':
name: keyword.context.vex
comment: Defines the context of the VEX code.
end: \b(\w*)\s?(\()
endCaptures:
'1':
name: entity.name.class.vex
'2':
name: punctuation.group.vex
- match: \b(break|continue|do|else|for|foreach|forpoints|gather|if|illuminance|return|while)\b
name: keyword.control.vex
- match: \b(bsdf|char|color|float|int|integer|matrix|matrix2|matrix3|matrix4|normal|point|string|struct|typedef|union|vector|vector2|vector4)\b
name: storage.type.builtin.vex
- captures:
'1':
name: support.function.library.vex
'2':
name: punctuation.group.vex
match: \b(Du|Dv|Dw|abs|accessframe|acos|addattrib|addattribute|adddetailattrib|addgroup|addpoint|addpointattrib|addprim|addprimattrib|addvariablename|addvertex|addvertexattrib|agentclipcatalog|agentcliplength|agentclipnames|agentclipsamplelocal|agentclipsampleworld|agentcliptimes|agentclipweights|agentcollisionlayer|agentcurrentlayer|agentlayerbindings|agentlayers|agentlayershapes|agentlocaltransform|agentlocaltransforms|agentrigchildren|agentrigfind|agentrigparent|agenttransformcount|agenttransformnames|agenttransformtolocal|agenttransformtoworld|agentworldtransform|agentworldtransforms|albedo|alphaname|ambient|anoise|append|area|argsort|array|ashikhmin|asin|assign|atan|atan2|atof|atoi|atten|attribsize|attribtype|attribtypeinfo|avg|binput|blackbody|blinn|blinnBRDF|bouncelabel|bouncemask|bumpmap|bumpmapA|bumpmapB|bumpmapG|bumpmapL|bumpmapR|bumpname|cbrt|ceil|ch|ch3|ch4|chend|chendf|chendt|chf|chi|chinput|chname|chnumchan|chp|chr|chramp|chrate|chs|chsraw|chstart|chstartf|chstartt|chv|cinput|ckspline|clamp|clip|colormap|colorname|computenormal|concat|cone|cos|cosh|cracktransform|cross|cspline|ctransform|curlnoise|curlnoise2d|curlxnoise|curlxnoise2d|cvex_bsdf|degrees|depthmap|depthname|detail|detailattrib|detailattribsize|detailattribtype|detailattribtypeinfo|detailintrinsic|determinant|diffuse|diffuseBRDF|dihedral|dimport|distance|distance2|dot|dsmpixel|eigenvalues|endswith|environment|erf|erf_inv|erfc|eulertoquaternion|eval_bsdf|exp|expandpointgroup|expandprimgroup|fastshadow|filamentsample|file_stat|filtershadow|filterstep|find|findattribval|findattribvalcount|finput|fit|fit01|fit10|fit11|floor|flownoise|flowpnoise|frac|fresnel|fromNDC|frontface|geoself|getattribute|getbbox|getblurP|getbounces|getbounds|getcomp|getcomponents|getfogname|getglobalraylevel|getlight|getlightid|getlightname|getlights|getlightscope|getmaterial|getobjectname|getphotonlight|getpointbbox|getprimid|getptextureid|getraylevel|getrayweight|getscope|getspace|gradient|hair|hasdetailattrib|haslight|hasplane|haspointattrib|hasprimattrib|hasvertexattrib|hedge_dstpoint|hedge_dstvertex|hedge_equivcount|hedge_isequiv|hedge_isprimary|hedge_isvalid|hedge_next|hedge_nextequiv|hedge_postdstpoint|hedge_postdstvertex|hedge_presrcpoint|hedge_presrcvertex|hedge_prev|hedge_prim|hedge_primary|hedge_srcpoint|hedge_srcvertex|henyeygreenstein|hscript_noise|hscript_rand|hscript_snoise|hscript_sturb|hscript_turb|hsvtorgb|iaspect|ichname|ident|iend|iendtime|ihasplane|import|ingroup|inpointgroup|inprimgroup|insert|instance|interpolate|intersect|intersect_all|intersect_lights|inumplanes|invert|iplaneindex|iplanename|iplanesize|irate|irradiance|isalpha|isbound|isconnected|isdigit|isfinite|isfogray|isframes|isnan|isotropic|israytracing|issamples|isseconds|isshadowray|istart|istarttime|isuvrendering|isvalidindex|isvarying|itoa|ixres|iyres|join|kspline|len|length|length2|lerp|lightid|limit_sample_space|limport|lkspline|log|log10|lookat|lspline|lstrip|luminance|lumname|makebasis|maketransform|maskname|match|matchvex_blinn|matchvex_specular|mattrib|max|mdensity|metaimport|metamarch|metanext|metastart|metaweight|min|minpos|mspace|nbouncetypes|nearpoint|nearpoints|neighbour|neighbourcount|neighbours|newgroup|newsampler|nextsample|ninput|noise|noised|normal_bsdf|normalize|normalname|npoints|npointsgroup|nprimitives|nprimitivesgroup|nrandom|ntransform|nuniqueval|occlusion|onoise|opend|opstart|optransform|ord|osd_facecount|osd_firstpatch|osd_limitsurface|osd_limitsurfacevertex|osd_patchcount|osd_patches|outerproduct|ow_nspace|ow_space|ow_vspace|pack_inttosafefloat|pathtrace|pcclose|pcconvex|pcexport|pcfarthest|pcfilter|pcfind|pcfind_radius|pcgenerate|pcimport|pcimportbyidx3|pcimportbyidx4|pcimportbyidxf|pcimportbyidxi|pcimportbyidxp|pcimportbyidxs|pcimportbyidxv|pciterate|pcnumfound|pcopen|pcopenlod|pcsampleleaf|pcsize|pcunshaded|pcwrite|phong|phongBRDF|phonglobe|photonmap|planeindex|planename|planesize|pluralize|pnoise|point|pointattrib|pointattribsize|pointattribtype|pointattribtypeinfo|pointedge|pointhedge|pointhedgenext|pointname|pointprims|pointvertex|pointvertices|polardecomp|pop|pow|prim|prim_attribute|prim_normal|primattrib|primattribsize|primattribtype|primattribtypeinfo|primhedge|primintrinsic|primpoint|primpoints|primuv|primvertex|primvertexcount|primvertices|printf|ptexture|ptlined|ptransform|push|qconvert|qdistance|qinvert|qmultiply|qrotate|quaternion|radians|rand|random|random_fhash|random_ihash|random_shash|random_sobol|rawbumpmap|rawbumpmapA|rawbumpmapB|rawbumpmapG|rawbumpmapL|rawbumpmapR|rawcolormap|rayhittest|rayimport|re_find|re_findall|re_match|re_replace|re_split|reflect|reflectlight|refract|refractlight|relbbox|relpointbbox|removegroup|removeindex|removepoint|removeprim|removevalue|renderstate|reorder|resize|resolvemissedray|reverse|rgbtohsv|rgbtoxyz|rint|rotate|rotate_x_to|rstrip|sample_bsdf|sample_cauchy|sample_circle_arc|sample_circle_edge_uniform|sample_circle_slice|sample_circle_uniform|sample_direction_cone|sample_direction_uniform|sample_discrete|sample_exponential|sample_geometry|sample_hemisphere|sample_hypersphere_cone|sample_hypersphere_uniform|sample_light|sample_lognormal|sample_lognormal_by_median|sample_normal|sample_orientation_cone|sample_orientation_uniform|sample_photon|sample_sphere_cone|sample_sphere_uniform|sampledisk|scale|select|sensor_panorama_create|sensor_panorama_getcolor|sensor_panorama_getcone|sensor_panorama_getdepth|sensor_save|serialize|set|setagentclipnames|setagentcliptimes|setagentclipweights|setagentcollisionlayer|setagentcurrentlayer|setagentlocaltransform|setagentlocaltransforms|setagentworldtransform|setagentworldtransforms|setattrib|setattribtypeinfo|setcomp|setcurrentlight|setdetailattrib|setpointattrib|setpointgroup|setprimattrib|setprimgroup|setprimintrinsic|setprimvertex|setvertexattrib|shadow|shadow_light|shadowmap|shimport|shl|shr|shrz|sign|simport|sin|sinh|sleep|slerp|slice|smooth|snoise|solvecubic|solvepoly|solvequadratic|sort|specular|specularBRDF|spline|split|sprintf|sqrt|startswith|storelightexport|strip|strlen|switch|swizzle|tan|tanh|tet_adjacent|tet_faceindex|teximport|texprintf|texture|texture3d|texture3dBox|titlecase|toNDC|tolower|toupper|trace|translate|translucent|transpose|trunc|tw_nspace|tw_space|tw_vspace|uniqueval|unpack_intfromsafefloat|unserialize|upush|variance|velocityname|vertex|vertexattrib|vertexattribsize|vertexattribtype|vertexattribtypeinfo|vertexhedge|vertexindex|vertexnext|vertexpoint|vertexprev|vertexprim|vertexprimindex|vnoise|volume|volumegradient|volumeindex|volumeindexorigin|volumeindextopos|volumeindexv|volumepostoindex|volumeres|volumesample|volumesamplev|vtransform|wireblinn|wirediffuse|wnoise|wo_nspace|wo_space|wo_vspace|writepixel|wt_nspace|wt_space|wt_vspace|xnoise|xnoised|xyzdist|xyztorgb)\b\s*(\()
- begin: (\w+)\s*\(
beginCaptures:
'1':
name: entity.name.function.vex
end: \)
name: meta.method.identifier.vex
patterns:
- include: $self
- match: \b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\b
name: constant.numeric.vex
- captures:
'1':
name: comment.block.preprocessor.vex
'2':
name: keyword.preprocessor.vex
match: \s*((#define|#else|#endif|#ifndef|#ifdef|#if|#include|#pragma|#undef).*$\n?)
- begin: '"'
beginCaptures:
'1':
name: punctuation.definition.string.begin.vex
end: '"'
endCaptures:
'1':
name: punctuation.definition.string.end.vex
name: string.quoted.double.vex
patterns:
- match: \\.
name: constant.character.escape.vex
- captures:
'1':
name: comment.line.double-slash.vex
'2':
name: punctuation.definition.comment.vex
match: \s*((//).*$\n?)
- begin: /\*
captures:
'1':
name: punctuation.definition.comment.vex
end: \*/
name: comment.block.vex
- match: \(|\)|,|:|;
name: punctuation.group.vex
- match: \+\+?|--?|\*|\^=?|\|\|?|\|=|&&?|&=|%=?|!=?|==?|~=?|<=?|>=?|\+=|\*=|-=|\/=?
name: keyword.operator.vex
- match: \b(LN10|LN2|LOG10E|LOG2E|PI|PI_2|PI_4|SQRT1_2|SQRT2|TOLERANCE)\b
name: constant.language
scopeName: source.vex
uuid: edd78512-59d9-4cb6-9733-a6adcc972160