-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathVEX.YAML-tmLanguage
78 lines (64 loc) · 10.3 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
76
77
78
# [PackageDev] target_format: plist, ext: tmLanguage
name: VEX
scopeName: source.vex
fileTypes: [vfl]
uuid: edd78512-59d9-4cb6-9733-a6adcc972160
patterns:
- comment: Defines the context of the VEX code.
begin: \b(chop|cop2|cvex|displace|fog|image3d|light|pop|shadow|sop|surface)\b
beginCaptures:
'1': {name: keyword.context.vex}
end: \b(\w*)\s?(\()
endCaptures:
'1': {name: entity.name.class.vex}
'2': {name: punctuation.group.vex}
- name: keyword.control.vex
match: \b(break|continue|do|else|for|foreach|forpoints|function|gather|if|illuminance|return|while)\b
- name: storage.modifier.vex
match: \b(const|export)\b
- name: storage.type.builtin.vex
match: \b(bsdf|char|color|float|int|integer|matrix|matrix2|matrix3|matrix4|normal|string|struct|typedef|union|vector|vector2|vector4|void)\b
- match: \b(Du|Dv|Dw|abs|accessframe|acos|addattrib|addattribute|adddetailattrib|addgroup|addpoint|addpointattrib|addprim|addprimattrib|addvariablename|addvertex|addvertexattrib|addvisualizer|agentaddclip|agentclipcatalog|agentclipchannel|agentcliplength|agentclipnames|agentclipsample|agentclipsamplelocal|agentclipsamplerate|agentclipsampleworld|agentcliptimes|agentcliptransformgroups|agentclipweights|agentcollisionlayer|agentcurrentlayer|agentlayerbindings|agentlayers|agentlayershapes|agentlocaltransform|agentlocaltransforms|agentrigchildren|agentrigfind|agentrigparent|agenttransformcount|agenttransformgroupmember|agenttransformgroups|agenttransformnames|agenttransformtolocal|agenttransformtoworld|agentworldtransform|agentworldtransforms|albedo|alphaname|ambient|anoise|append|area|argsort|array|ashikhmin|asin|assert_enabled|assign|atan|atan2|atof|atoi|atten|attrib|attribclass|attribsize|attribtype|attribtypeinfo|avg|binput|blackbody|blinn|blinnBRDF|bouncelabel|bouncemask|bumpmap|bumpmapA|bumpmapB|bumpmapG|bumpmapL|bumpmapR|bumpname|cbrt|ceil|ch|ch3|ch4|chattr|chend|chendf|chendt|chf|chi|chindex|chinput|chname|chnumchan|chp|chr|chramp|chrate|chreadbuf|chresizebuf|chs|chsetattr|chsraw|chstart|chstartf|chstartt|chv|chwritebuf|cinput|ckspline|clamp|clip|colormap|colorname|computenormal|concat|cone|cos|cosh|cracktransform|create_cdf|create_pdf|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|efit|eigenvalues|endswith|environment|erf|erf_inv|erfc|error|eulertoquaternion|eval_bsdf|exp|expand_udim|expandedgegroup|expandpointgroup|expandprimgroup|fastshadow|filamentsample|file_stat|filtershadow|filterstep|find|findattribval|findattribvalcount|finput|fit|fit01|fit10|fit11|floor|flownoise|flowpnoise|frac|fresnel|fromNDC|frontface|fuzzify|fuzzy_and|fuzzy_defuzz_centroid|fuzzy_nand|fuzzy_nor|fuzzy_not|fuzzy_nxor|fuzzy_or|fuzzy_xor|geoself|geounwrap|getattrib|getattribute|getbbox|getbbox_center|getbbox_max|getbbox_min|getbbox_size|getblurP|getbounces|getbounds|getcomp|getcomponents|getderiv|getfogname|getglobalraylevel|getgroupid|getlight|getlightid|getlightname|getlights|getlightscope|getlocalcurvature|getmaterial|getmaterialid|getobjectid|getobjectname|getphotonlight|getpointbbox|getpointbbox_center|getpointbbox_max|getpointbbox_min|getpointbbox_size|getprimid|getptextureid|getraylevel|getrayweight|getsamplestore|getscope|getsmoothP|getspace|getuvtangents|gradient|hair|hasattrib|hasdetailattrib|haslight|hasmetadata|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|idtopoint|idtoprim|iend|iendtime|ihasplane|import|inedgegroup|ingroup|inpointgroup|inprimgroup|insert|instance|interpolate|intersect|intersect_all|intersect_lights|inumplanes|invert|invertexgroup|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|lightbounces|lightid|limit_sample_space|limport|lkspline|log|log10|lookat|lspline|lstrip|luminance|lumname|makebasis|maketransform|maskname|match|matchvex_blinn|matchvex_specular|mattrib|max|mdensity|metadata|metaimport|metamarch|metanext|metastart|metaweight|min|minpos|mspace|nametopoint|nametoprim|nbouncetypes|nearpoint|nearpoints|nedgesgroup|neighbour|neighbourcount|neighbours|newgroup|newsampler|nextsample|ninput|ninputs|noise|noised|normal_bsdf|normalize|normalname|npoints|npointsgroup|nprimitives|nprimitivesgroup|nrandom|ntransform|nuniqueval|nvertices|nverticesgroup|occlusion|ocean_sample|ocio_import|ocio_spaces|ocio_transform|onoise|opdigits|opend|opfullpath|opparentbonetransform|opparenttransform|opparmtransform|oppreconstrainttransform|oppretransform|opstart|optransform|ord|osd_facecount|osd_firstpatch|osd_limitsurface|osd_limitsurfacevertex|osd_lookupface|osd_lookuppatch|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|pgfind|phong|phongBRDF|phonglobe|photonmap|planeindex|planename|planepointdistance|planesize|planesphereintersect|pluralize|pnoise|point|pointattrib|pointattribsize|pointattribtype|pointattribtypeinfo|pointedge|pointhedge|pointhedgenext|pointname|pointprims|pointvertex|pointvertices|polardecomp|pop|pow|predicate_incircle|predicate_insphere|predicate_orient2d|predicate_orient3d|prim|prim_attribute|prim_normal|primarclen|primattrib|primattribsize|primattribtype|primattribtypeinfo|primduv|primfind|primhedge|primintrinsic|primpoint|primpoints|primuv|primuvconvert|primvertex|primvertexcount|primvertices|print_once|printf|product|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|relativepath|relbbox|relpointbbox|removegroup|removeindex|removepoint|removeprim|removevalue|renderstate|reorder|resample_linear|resize|resolvemissedray|reverse|rgbtohsv|rgbtoxyz|rint|rotate|rotate_x_to|rstrip|sample_bsdf|sample_cauchy|sample_cdf|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|scatter|select|sensor_panorama_create|sensor_panorama_getcolor|sensor_panorama_getcone|sensor_panorama_getdepth|sensor_save|serialize|set|setagentclipnames|setagentclips|setagentcliptimes|setagentclipweights|setagentcollisionlayer|setagentcurrentlayer|setagentlocaltransform|setagentlocaltransforms|setagentworldtransform|setagentworldtransforms|setattrib|setattribtypeinfo|setcomp|setcurrentlight|setdetailattrib|setedgegroup|setpointattrib|setpointgroup|setprimattrib|setprimgroup|setprimintrinsic|setprimvertex|setsamplestore|setvertexattrib|setvertexgroup|setvertexpoint|shadow|shadow_light|shadowmap|shimport|shl|shr|shrz|sign|simport|sin|sinh|sleep|slerp|slice|slideframe|smooth|smoothrotation|snoise|solid_angle|solvecubic|solvepoly|solvequadratic|sort|specular|specularBRDF|spline|split|split_bsdf|splitpath|sprintf|sqrt|sssapprox|startswith|storelightexport|strip|strlen|sum|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|uvdist|uvintersect|uvsample|uvunwrap|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|volumevoxeldiameter|vtransform|warning|wireblinn|wirediffuse|wnoise|wo_nspace|wo_space|wo_vspace|writepixel|wt_nspace|wt_space|wt_vspace|xnoise|xnoised|xyzdist|xyztorgb)\b\s*(\()
captures:
'1': {name: support.function.library.vex}
'2': {name: punctuation.group.vex}
- name: meta.method.identifier.vex
begin: (\w+)\s*\(
beginCaptures:
'1': {name: entity.name.function.vex}
end: \)
patterns:
- include: $self
- name: constant.numeric.vex
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
- match: \s*((#define|#else|#endif|#ifndef|#ifdef|#if|#include|#pragma|#undef).*$\n?)
captures:
'1': {name: comment.block.preprocessor.vex}
'2': {name: keyword.preprocessor.vex}
- name: string.quoted.double.vex
begin: '"'
beginCaptures:
'1': {name: punctuation.definition.string.begin.vex}
end: '"'
endCaptures:
'1': {name: punctuation.definition.string.end.vex}
patterns:
- name: constant.character.escape.vex
match: \\.
- match: \s*((//).*$\n?)
captures:
'1': {name: comment.line.double-slash.vex}
'2': {name: punctuation.definition.comment.vex}
- name: comment.block.vex
begin: /\*
end: \*/
captures:
'1': {name: punctuation.definition.comment.vex}
- name: punctuation.group.vex
match: \(|\)|,|:|;
- name: keyword.operator.vex
match: \+\+?|--?|\*|@|\^=?|\|\|?|\|=|&&?|&=|%=?|!=?|==?|~=?|<=?|>=?|\+=|\*=|-=|\/=?
- name: constant.language
match: \b(LN10|LN2|LOG10E|LOG2E|PI|PI_2|PI_4|SQRT1_2|SQRT2|TOLERANCE)\b
foldingStartMarker: (\{\s*(//.*)?$|^\s*// \{\{\{)
foldingStopMarker: ^\s*(\}|// \}\}\}$)