Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { scopeName = 'source.povray';
- fileTypes = ( 'pov', 'lib', 'mac' );
- foldingStartMarker = '(?x)
- ^\s*
- (\#macro.*
- |\#switch.*
- |\#while.*
- |\#if.*
- |.*\{.*
- )\s*$
- ';
- foldingStopMarker = '^\s*\}|^\s*#end\b\s*$';
- patterns = (
- { name = 'comment.block.povray';
- begin = '/\*';
- end = '\*/';
- },
- { name = 'comment.line.double-slash.povray';
- begin = '//';
- end = '$\n?';
- },
- { name = 'string.quoted.double.povray';
- begin = '"';
- end = '"';
- patterns = (
- { name = 'constant.character.escape.povray';
- match = '\\.';
- }
- );
- },
- { name = 'meta.function.with-parentheses.povray';
- match = '(#macro)\s*([\w_]+)\s*\(\s*(.*)\s*\)';
- comment = 'use begin and end to match the whole block?';
- captures =
- { 1 = { name = 'keyword.control.povray'; };
- 2 = { name = 'entity.name.function.povray'; };
- 3 = { name = 'variable.parameter.povray'; };
- };
- },
- { name = 'meta.something.povray';
- match = '(#if)\s*\(\s*(.*)\s*\)';
- comment = 'use begin and end to match the whole block?';
- captures =
- { 1 = { name = 'keyword.control.povray'; };
- 2 = { name = 'something.povray'; };
- };
- },
- { name = 'meta.function.povray';
- match = '(acos|degrees|concat|vlength)\s*\(\s*(.*)\s*\)';
- comment = 'This breaks when spread across multiple lines';
- captures =
- { 1 = { name = 'keyword.control.povray'; };
- 2 = { name = 'something.povray'; };
- };
- },
- { name = 'meta.notsure.povray';
- begin = '(union)\s*(\{)';
- end = '(\})';
- comment = 'The end does not work right, it grabs the first } it finds, which is wrong.';
- captures =
- { 1 = { name = 'keyword.control.povray'; };
- 2 = { name = 'variable.parameter.povray'; };
- };
- patterns = ( { include = '$self'; } );
- },
- { name = 'keyword.control.povray';
- match = '(#if|#end|#local|#declare|#debug)\b';
- },
- { name = 'keyword.control.povray';
- match = '\b(translate|scale|rotate|object)\b';
- },
- );
- }
Add Comment
Please, Sign In to add comment