{ scopeName = 'source.rebol'; firstLineMatch = '^#!/.*\brebol\b'; fileTypes = ( 'r' ); foldingStartMarker = '^([^;]*[\[\{\(])+\s*(\;.*)?$'; foldingStopMarker = '^\s*[\]\}\)].*$'; patterns = ( { include = '#comments'; }, { include = '#type-literal'; }, { include = '#logic'; }, { include = '#strings'; }, { include = '#values'; }, { include = '#words'; }, ); repository = { binary-base-sixteen = { name = 'binary.base16.rebol'; begin = '(16)?#\{'; end = '\}'; patterns = ( { name = 'binary.data.rebol'; match = '[0-9a-fA-F]*'; }, ); }; binary-base-sixtyfour = { name = 'binary.base64.rebol'; begin = '64#\{'; end = '\}'; }; binary-base-two = { name = 'binary.base2.rebol'; begin = '2#\{'; end = '\}'; patterns = ( { name = 'binary.data.rebol'; match = '[01]*'; }, ); }; character = { name = 'character.rebol'; match = '#"(\^(\([0-9a-fA-F]{2}\)|.)|[^\^\"])"'; }; character-html = { name = 'constant.character.entity.html'; match = '(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)'; captures = { 1 = { name = 'punctuation.definition.entity.html'; }; 3 = { name = 'punctuation.definition.entity.html'; }; }; }; character-inline = { name = 'string.escaped.rebol'; match = '\^(\([0-9a-fA-F]{2}\)|.)'; }; comment-line = { name = 'comment.line.rebol'; match = ';.*?(?=\%>|$)'; }; comment-multiline-block = { name = 'comment.multiline.rebol'; begin = 'comment\s*\['; end = '\]'; patterns = ( { include = '#comment-multiline-block-nested'; } ); }; comment-multiline-block-nested = { name = 'comment.multiline.rebol'; begin = '\['; end = '\]'; patterns = ( { include = '#comment-multiline-block-nested'; } ); }; comment-multiline-string = { name = 'comment.multiline.rebol'; begin = 'comment\s*\{'; end = '\}'; patterns = ( { include = '#comment-multiline-string-nested'; } ); }; comment-multiline-string-nested = { name = 'comment.multiline.rebol'; begin = '\{'; end = '\}'; patterns = ( { include = '#comment-multiline-string-nested'; } ); }; comments = { patterns = ( { include = '#comment-shebang'; }, { include = '#comment-line'; }, { include = '#comment-multiline-string'; }, { include = '#comment-multiline-block'; }, ); }; comments-shebang = { name = 'comment.shebang'; match = '^#!/.*rebol.*'; }; doublequotedString = { name = 'string.quoted.double.xml'; begin = '"'; end = '"'; }; logic = { name = 'logic.rebol'; match = '#\[(true|false|none)]'; }; rsp-tag = { name = 'source.rebol'; begin = '<%={0,2} '; end = ' %>'; patterns = ( { include = 'source.rebol'; } ); }; singlequotedString = { name = 'string.quoted.single.xml'; begin = "'"; end = "'"; }; string-email = { name = 'string.email.rebol'; match = '[^\s\n:/\[\]\(\)]+@[^\s\n:/\[\]\(\)]+'; }; string-file = { name = 'string.file.rebol'; match = '%[^\s\n\[\]\(\)]*'; }; string-file-quoted = { name = 'string.file.rebol'; begin = '%"'; end = '"'; patterns = ( { name = 'constant.character.hex.rebol'; match = '%[A-Fa-f0-9]{2}'; }, ); }; string-issue = { name = 'string.issue.rebol'; match = '#[^\s\n\[\]\(\)]*'; }; string-multiline = { name = 'string.multiline.rebol'; begin = '\{'; end = '\}'; patterns = ( { include = '#rsp-tag'; }, { include = '#character-inline'; }, { include = '#character-html'; }, { include = '#string-nested-multiline'; }, ); }; string-nested-multiline = { name = 'string.multiline.rebol'; begin = '\{'; end = '\}'; patterns = ( { include = '#string-nested-multiline'; } ); }; string-quoted = { name = 'string.rebol'; begin = '"'; end = '"'; patterns = ( { include = '#rsp-tag'; }, { include = '#character-inline'; }, { include = '#character-html'; }, ); }; string-tag = { name = 'entity.tag.rebol'; begin = '<(?:\/|%\=?\ )?(?:([-_a-zA-Z0-9]+):)?([-_a-zA-Z0-9:]+)'; end = '(?:\s/|\ %)?>'; captures = { 1 = { name = 'entity.other.namespace.xml'; }; 2 = { name = 'entity.name.tag.xml'; }; }; patterns = ( { match = ' (?:([-_a-zA-Z0-9]+):)?([_a-zA-Z-]+)'; captures = { 1 = { name = 'entity.other.namespace.xml'; }; 2 = { name = 'entity.other.attribute-name.xml'; }; }; }, { include = '#doublequotedString'; }, { include = '#singlequotedString'; }, ); }; string-url = { name = 'string.url.rebol'; match = '[A-Za-z][\w]{1,7}:(/{0,3}[^\s\n\[\]\(\)]+|//)'; }; strings = { patterns = ( { include = '#character'; }, { include = '#string-quoted'; }, { include = '#string-multiline'; }, { include = '#string-tag'; }, { include = '#string-file-quoted'; }, { include = '#string-file'; }, { include = '#string-url'; }, { include = '#string-email'; }, { include = '#binary-base-two'; }, { include = '#binary-base-sixty-four'; }, { include = '#binary-base-sixteen'; }, { include = '#string-issue'; }, ); }; strung-tag = { name = 'entity.tag.rebol'; begin = '<'; end = '>'; }; tagStuff = { patterns = ( { match = ' (?:([-_a-zA-Z0-9]+):)?([_a-zA-Z-]+)'; captures = { 1 = { name = 'entity.other.namespace.xml'; }; 2 = { name = 'entity.other.attribute-name.xml'; }; }; }, { include = '#doublequotedString'; }, { include = '#singlequotedString'; }, ); }; type-literal = { name = 'series.literal.rebol'; begin = '#\[(?:(\w+!)|(true|false|none))'; end = ']'; captures = { 1 = { name = 'native.datatype.rebol'; }; 2 = { name = 'logic.rebol'; }; }; patterns = ( { include = '$self'; } ); }; value-date = { name = 'date.rebol'; match = '\d{1,2}\-([A-Za-z]{3}|January|Febuary|March|April|May|June|July|August|September|October|November|December)\-\d{4}(/\d{1,2}[:]\d{1,2}([:]\d{1,2}(\.\d{1,5})?)?([+-]\d{1,2}[:]\d{1,2})?)?'; captures = { 2 = { name = 'time.rebol'; }; }; }; value-money = { name = 'number.money.rebol'; match = '(?=?|<(=|>)?(?![/%])|\?)(?=$|\W)'; }; word-qm = { name = 'native.rebol.qm'; match = '\b(qm|render|redirect-to|publish|response|action|event|import|get-param|get-cookie|set-cookie|know)(?!(\w|-|\.))(?=$|\W)'; }; word-refine = { name = 'word.refine.rebol'; match = '/[A-Za-z=][A-Za-z0-9=\-\!\?\_\*\.]*'; }; word-set = { name = 'word.set.rebol'; match = '[A-Za-z=\-\?\!\_\*\+\.][A-Za-z0-9=\-\!\?\_\*\+\.]*(/([A-Za-z=][A-Za-z0-9=\-\!\?\_\*\.\+\.]*|\d+))*:'; }; words = { name = 'word.rebol'; patterns = ( { include = '#word-datatype'; }, { include = '#word-set'; }, { include = '#word-get'; }, { include = '#word-lit'; }, { include = '#word-header'; }, { include = '#word-native'; }, { include = '#word-qm'; }, { include = '#word-logic'; }, { include = '#word-refine'; }, { include = '#word'; }, ); }; }; }