{ "name": "Factor", "scopeName": "source.factor", "patterns": [ { "name": "definition.word.factor", "match": "(^|(?\u003c=\\s))(::?)\\s+([^\\s]+)\\s", "captures": { "2": { "name": "keyword.colon.factor" }, "3": { "name": "entity.name.function.factor" }, "4": { "name": "comment.stack-effect.factor" } } }, { "name": "definition.word.class.factor", "match": "(^|(?\u003c=\\s))(C:)\\s+([^\\s]+)\\s", "captures": { "2": { "name": "keyword.colon.factor" }, "3": { "name": "entity.name.method.factor" }, "4": { "name": "comment.stack-effect.factor" } } }, { "name": "definition.word.method.factor", "match": "(^|(?\u003c=\\s))(M:)\\s+([^\\s]+)\\s+([^\\s]+)\\s", "captures": { "2": { "name": "keyword.colon.factor" }, "3": { "name": "entity.name.class.factor" }, "4": { "name": "entity.name.method.factor" }, "5": { "name": "comment.stack-effect.factor" } } }, { "name": "definition.word.generic.factor", "match": "(^|(?\u003c=\\s))(GENERIC:)\\s+([^\\s]+)\\s", "captures": { "2": { "name": "keyword.colon.factor" }, "3": { "name": "entity.name.generic.factor" }, "5": { "name": "comment.stack-effect.factor" } } }, { "name": "definition.word.generic.factor", "match": "(^|(?\u003c=\\s))(GENERIC#)\\s+([^\\s]+)\\s(\\d+)\\s", "captures": { "2": { "name": "keyword.colon.factor" }, "3": { "name": "entity.name.generic.factor" }, "5": { "name": "comment.stack-effect.factor" } } }, { "name": "meta.class.factor", "match": "(^|(?\u003c=\\s))(TUPLE:|BUILTIN:)\\s+([^\\s]+)\\s+(([^\\s]+)+)", "captures": { "2": { "name": "storage.type.factor" }, "3": { "name": "entity.name.class.factor" } } }, { "name": "keyword.control.kernel.factor", "match": "(^|(?\u003c=\\s))(\u003eboolean|\u003cwrapper\u003e|\\(clone\\)|-rot|2bi|2bi@|2bi\\*|2curry|2dip|2drop|2dup|2keep|2nip|2over|2tri|2tri@|2tri\\*|2with|3bi|3curry|3dip|3drop|3dup|3keep|3tri|4dip|4drop|4dup|4keep|=|\\?|\\?if|and|assert|assert=|assert\\?|bi|bi-curry|bi-curry@|bi-curry\\*|bi@|bi\\*|boa|boolean|boolean\\?|both\\?|build|call|callstack|callstack\u003earray|callstack\\?|clear|clone|compose|compose\\?|curry|curry\\?|datastack|die|dip|do|drop|dup|dupd|either\\?|eq\\?|equal\\?|execute|hashcode|hashcode\\*|identity-hashcode|identity-tuple|identity-tuple\\?|if|if\\*|keep|loop|most|new|nip|not|null|object|or|over|pick|prepose|retainstack|rot|same\\?|swap|swapd|throw|tri|tri-curry|tri-curry@|tri-curry\\*|tri@|tri\\*|tuple|tuple\\?|unless|unless\\*|until|when|when\\*|while|with|wrapper|wrapper\\?|xor)(\\s|$)" }, { "name": "keyword.control.namespaces.factor", "match": "(^|(?\u003c=\\s))(\\+@|change|change-global|counter|dec|get|get-global|global|inc|init-namespaces|initialize|is-global|namespace|namestack|off|on|set|set-global|set-namestack|toggle|with-global|with-scope|with-variable|with-variables)(\\s|$)" }, { "name": "keyword.control.assocs.factor", "match": "(^|(?\u003c=\\s))(\u003ealist|\u003cenum\u003e|2cache|\\?at|\\?of|assoc|assoc\u003emap|assoc-all\\?|assoc-any\\?|assoc-clone-like|assoc-combine|assoc-diff|assoc-diff!|assoc-differ|assoc-each|assoc-empty\\?|assoc-filter|assoc-filter!|assoc-filter-as|assoc-find|assoc-hashcode|assoc-intersect|assoc-like|assoc-map|assoc-map-as|assoc-partition|assoc-refine|assoc-size|assoc-stack|assoc-subset\\?|assoc-union|assoc-union!|assoc=|assoc\\?|at|at\\*|at\\+|cache|change-at|clear-assoc|delete-at|delete-at\\*|enum|enum\\?|extract-keys|inc-at|key\\?|keys|map\u003eassoc|maybe-set-at|new-assoc|of|push-at|rename-at|set-at|sift-keys|sift-values|substitute|unzip|value-at|value-at\\*|value\\?|values|zip|zip-as|zip-index|zip-index-as)(\\s|$)" }, { "name": "keyword.control.combinators.factor", "match": "(^|(?\u003c=\\s))(2cleave|2cleave\u003equot|3cleave|3cleave\u003equot|4cleave|4cleave\u003equot|alist\u003equot|call-effect|case|case\u003equot|case-find|cleave|cleave\u003equot|cond|cond\u003equot|deep-spread\u003equot|execute-effect|linear-case-quot|no-case|no-case\\?|no-cond|no-cond\\?|recursive-hashcode|shallow-spread\u003equot|spread|to-fixed-point|wrong-values|wrong-values\\?)(\\s|$)" }, { "name": "keyword.control.math.factor", "match": "(^|(?\u003c=\\s))(\u003e|\u003e=|\u003ebignum|\u003efixnum|\u003efloat|\u003einteger|\u003c|\u003c=|\u003cfp-nan\u003e|\\(all-integers\\?\\)|\\(each-integer\\)|\\(find-integer\\)|-|/|/f|/i|/mod|2/|2^|\\*|\\+|\\?1\\+|abs|align|all-integers\\?|bignum|bignum\\?|bit\\?|bitand|bitnot|bitor|bits\u003edouble|bits\u003efloat|bitxor|complex|complex\\?|denominator|double\u003ebits|each-integer|even\\?|find-integer|find-last-integer|fixnum|fixnum\\?|float|float\u003ebits|float\\?|fp-bitwise=|fp-infinity\\?|fp-nan-payload|fp-nan\\?|fp-qnan\\?|fp-sign|fp-snan\\?|fp-special\\?|if-zero|imaginary-part|integer|integer\u003efixnum|integer\u003efixnum-strict|integer\\?|log2|log2-expects-positive|log2-expects-positive\\?|mod|neg|neg\\?|next-float|next-power-of-2|number|number=|number\\?|numerator|odd\\?|power-of-2\\?|prev-float|ratio|ratio\\?|rational|rational\\?|real|real-part|real\\?|recip|rem|sgn|shift|sq|times|u\u003e|u\u003e=|u\u003c|u\u003c=|unless-zero|unordered\\?|when-zero|zero\\?)(\\s|$)" }, { "name": "keyword.control.sequences.factor", "match": "(^|(?\u003c=\\s))(\u003crepetition\u003e|\u003creversed\u003e|\u003cslice\u003e|1sequence|2all\\?|2each|2map|2map-as|2map-reduce|2reduce|2selector|2sequence|3append|3append-as|3each|3map|3map-as|3sequence|4sequence|\\?first|\\?last|\\?nth|\\?second|\\?set-nth|accumulate|accumulate!|accumulate-as|all\\?|any\\?|append|append!|append-as|assert-sequence|assert-sequence=|assert-sequence\\?|binary-reduce|bounds-check|bounds-check\\?|bounds-error|bounds-error\\?|but-last|but-last-slice|cartesian-each|cartesian-map|cartesian-product|change-nth|check-slice|check-slice-error|clone-like|collapse-slice|collector|collector-for|concat|concat-as|copy|count|cut|cut-slice|cut\\*|delete-all|delete-slice|drop-prefix|each|each-from|each-index|empty\\?|exchange|filter|filter!|filter-as|find|find-from|find-index|find-index-from|find-last|find-last-from|first|first2|first3|first4|flip|follow|fourth|glue|halves|harvest|head|head-slice|head-slice\\*|head\\*|head\\?|if-empty|immutable|immutable-sequence|immutable-sequence\\?|immutable\\?|index|index-from|indices|infimum|infimum-by|insert-nth|interleave|iota|iota-tuple|iota-tuple\\?|join|join-as|last|last-index|last-index-from|length|lengthen|like|longer|longer\\?|longest|map|map!|map-as|map-find|map-find-last|map-index|map-index-as|map-integers|map-reduce|map-sum|max-length|member-eq\\?|member\\?|midpoint@|min-length|mismatch|move|new-like|new-resizable|new-sequence|non-negative-integer-expected|non-negative-integer-expected\\?|nth|nths|pad-head|pad-tail|padding|partition|pop|pop\\*|prefix|prepend|prepend-as|produce|produce-as|product|push|push-all|push-either|push-if|reduce|reduce-index|remove|remove!|remove-eq|remove-eq!|remove-nth|remove-nth!|repetition|repetition\\?|replace-slice|replicate|replicate-as|rest|rest-slice|reverse|reverse!|reversed|reversed\\?|second|selector|selector-for|sequence|sequence-hashcode|sequence=|sequence\\?|set-first|set-fourth|set-last|set-length|set-nth|set-second|set-third|short|shorten|shorter|shorter\\?|shortest|sift|slice|slice-error|slice-error\\?|slice\\?|snip|snip-slice|start|start\\*|subseq|subseq\\?|suffix|suffix!|sum|sum-lengths|supremum|supremum-by|surround|tail|tail-slice|tail-slice\\*|tail\\*|tail\\?|third|trim|trim-head|trim-head-slice|trim-slice|trim-tail|trim-tail-slice|unclip|unclip-last|unclip-last-slice|unclip-slice|unless-empty|virtual-exemplar|virtual-sequence|virtual-sequence\\?|virtual@|when-empty)(\\s|$)" }, { "name": "keyword.control.arrays.factor", "match": "(^|(?\u003c=\\s))(\u003earray|\u003carray\u003e|1array|2array|3array|4array|array|array\\?|pair|pair\\?|resize-array)(\\s|$)" }, { "name": "keyword.control.io.factor", "match": "(^|(?\u003c=\\s))(\\(each-stream-block-slice\\)|\\(each-stream-block\\)|\\(stream-contents-by-block\\)|\\(stream-contents-by-element\\)|\\(stream-contents-by-length-or-block\\)|\\(stream-contents-by-length\\)|\\+byte\\+|\\+character\\+|bad-seek-type|bad-seek-type\\?|bl|contents|each-block|each-block-size|each-block-slice|each-line|each-morsel|each-stream-block|each-stream-block-slice|each-stream-line|error-stream|flush|input-stream|input-stream\\?|invalid-read-buffer|invalid-read-buffer\\?|lines|nl|output-stream|output-stream\\?|print|read|read-into|read-partial|read-partial-into|read-until|read1|readln|seek-absolute|seek-absolute\\?|seek-end|seek-end\\?|seek-input|seek-output|seek-relative|seek-relative\\?|stream-bl|stream-contents|stream-contents\\*|stream-copy|stream-copy\\*|stream-element-type|stream-flush|stream-length|stream-lines|stream-nl|stream-print|stream-read|stream-read-into|stream-read-partial|stream-read-partial-into|stream-read-partial-unsafe|stream-read-unsafe|stream-read-until|stream-read1|stream-readln|stream-seek|stream-seekable\\?|stream-tell|stream-write|stream-write1|tell-input|tell-output|with-error\u003eoutput|with-error-stream|with-error-stream\\*|with-input-output\\+error-streams|with-input-output\\+error-streams\\*|with-input-stream|with-input-stream\\*|with-output\u003eerror|with-output-stream|with-output-stream\\*|with-output\\+error-stream|with-output\\+error-stream\\*|with-streams|with-streams\\*|write|write1)(\\s|$)" }, { "name": "keyword.control.strings.factor", "match": "(^|(?\u003c=\\s))(\u003estring|\u003cstring\u003e|1string|resize-string|string|string\\?)(\\s|$)" }, { "name": "keyword.control.vectors.factor", "match": "(^|(?\u003c=\\s))(\u003evector|\u003cvector\u003e|1vector|\\?push|vector|vector\\?)(\\s|$)" }, { "name": "keyword.control.continuations.factor", "match": "(^|(?\u003c=\\s))(\u003ccondition\u003e|\u003ccontinuation\u003e|\u003crestart\u003e|attempt-all|attempt-all-error|attempt-all-error\\?|callback-error-hook|callcc0|callcc1|cleanup|compute-restarts|condition|condition\\?|continuation|continuation\\?|continue|continue-restart|continue-with|current-continuation|error|error-continuation|error-in-thread|error-thread|ifcc|ignore-errors|in-callback\\?|original-error|recover|restart|restart\\?|restarts|rethrow|rethrow-restarts|return|return-continuation|thread-error-hook|throw-continue|throw-restarts|with-datastack|with-return)(\\s|$)" }, { "name": "keyword.control.using.factor", "begin": "(^|(?\u003c=\\s))(USING:)", "end": "(?\u003c=\\s);(\\s|$)", "patterns": [ { "name": "constant.namespace.factor", "match": "(^|(?\u003c=\\s))[^\\s]+(\\s|$)" } ] }, { "name": "constant.language.factor", "match": "(^|(?\u003c=\\s))(f|t)(\\s|$)" }, { "name": "constant.character.factor", "match": "(^|(?\u003c=\\s))CHAR:\\s+[^\\s]+(\\s|$)" }, { "name": "constant.numeric.integer.factor", "match": "(^|(?\u003c=\\s))[+-]?\\d([\\d,]*\\d)?(\\s|$)" }, { "name": "constant.numeric.float.factor", "match": "(^|(?\u003c=\\s))[+-]?(\\d([\\d,]*\\d)?)?\\.\\d([\\d,]*\\d)?([Ee][+-]?\\d([\\d,]*\\d)?)?(\\s|$)" }, { "name": "constant.numeric.neg-ratio.factor", "match": "(^|(?\u003c=\\s))(-\\d([\\d,]*\\d)?)?-?\\d([\\d,]*\\d)?/\\d([\\d,]*\\d)?(\\s|$)" }, { "name": "constant.numeric.pos-ratio.factor", "match": "(^|(?\u003c=\\s))\\+?(\\d([\\d,]*\\d)?\\+?)?\\d([\\d,]*\\d)?/\\d([\\d,]*\\d)?(\\s|$)" }, { "name": "constant.numeric.binary.factor", "match": "(^|(?\u003c=\\s))[+-]?0b[01]([01,]*[01])?(\\s|$)" }, { "name": "constant.numeric.octal.factor", "match": "(^|(?\u003c=\\s))[+-]?0o[0-7]([0-7,]*[0-7])?(\\s|$)" }, { "name": "constant.numeric.hex.factor", "match": "(^|(?\u003c=\\s))[+-]?0x[0-9a-fA-Fp]([0-9a-fA-F,]*[0-9a-fA-F])?(p[0-9a-fA-Fp]([0-9a-fA-F,]*[0-9a-fA-F])?)?(\\s|$)" }, { "name": "string.quoted.double.factor", "begin": "\"", "end": "\"", "patterns": [ { "include": "#escaped_characters" } ] }, { "name": "string.quoted.double.multiline.factor", "begin": "\u003c\"", "end": "\"\u003e", "patterns": [ { "include": "#escaped_characters" } ] }, { "name": "definition.word.heredoc.factor", "contentName": "string.unquoted.heredoc.factor", "begin": "(^|(?\u003c=\\s))(STRING:)\\s+(\\S+)", "end": "^;$", "captures": { "2": { "name": "keyword.colon.factor" }, "3": { "name": "entity.name.heredoc.factor" } } }, { "name": "storage.modifier.factor", "match": "inline|foldable" }, { "name": "comment.line.factor", "match": "(^|(?\u003c=\\s))#?!(\\s.*)?$" }, { "name": "comment.parens.factor", "begin": "\\((?=\\s)", "end": "(^|(?\u003c=\\s))\\)" }, { "name": "keyword.control.postpone.factor", "match": "\\b[^\\s]+:\\s+[^\\s]+(\\s|$)" } ], "repository": { "escaped_characters": { "patterns": [ { "name": "constant.character.escape.factor", "match": "\\\\(\\\\|[abefnrtsv0\"]|x[a-fA-F0-9]{2}|u[a-fA-F0-9]{6})" }, { "name": "invalid.illegal.unknown-escape.factor", "match": "\\\\." } ] } } }