cleanup and fix tests

This commit is contained in:
nightwing 2013-04-06 15:17:41 +04:00
commit 2868df4b28
14 changed files with 1689 additions and 18 deletions

View file

@ -102,7 +102,7 @@ var docs = {
"docs/luapage.lp": "LuaPage",
"docs/Makefile": "Makefile",
"docs/markdown.md": {name: "Markdown", wrapped: true},
"docs/tinymush.mc": {name: "TinyMUSH"},
"docs/tinymush.mc": {name: "TinyMUSH", wrapped: true},
"docs/objectivec.m": {name: "Objective-C"},
"docs/ocaml.ml": "OCaml",
"docs/OpenSCAD.scad": "OpenSCAD",

View file

@ -0,0 +1,272 @@
[[
"start",
["text","package code"]
],[
"start",
["text","{"]
],[
"punctuation.definition.comment.actionscript.2",
["text"," "],
["punctuation.definition.comment.actionscript.2","/*"],
["comment.block.actionscript.2","****************************************"]
],[
"punctuation.definition.comment.actionscript.2",
["comment.block.actionscript.2","\t * based on textmate actionscript bundle"]
],[
"start",
["comment.block.actionscript.2","\t ***************************************"],
["punctuation.definition.comment.actionscript.2","*/"]
],[
"start",
["text","\t "]
],[
"start",
["text","\t"],
["keyword.control.actionscript.2","import"],
["text"," fl.events.SliderEvent;"]
],[
"start",
["text","\t"]
],[
"start",
["text","\t"],
["keyword.control.actionscript.2","public"],
["text"," "],
["storage.type.class.actionscript.2","class"],
["meta.class.actionscript.2"," "],
["entity.name.type.class.actionscript.2","Foo"],
["meta.class.actionscript.2"," "],
["storage.modifier.extends.actionscript.2","extends"],
["meta.class.actionscript.2"," "],
["entity.other.inherited-class.actionscript.2","MovieClip"]
],[
"start",
["text","\t{"]
],[
"start",
["text","\t\t"],
["punctuation.definition.comment.actionscript.2","//"],
["comment.line.double-slash.actionscript.2","*************************"]
],[
"start",
["text","\t\t"],
["punctuation.definition.comment.actionscript.2","//"],
["comment.line.double-slash.actionscript.2"," Properties:"]
],[
"start",
["text","\t\t"]
],[
"start",
["text","\t\t"],
["keyword.control.actionscript.2","public"],
["text"," "],
["keyword.control.actionscript.2","var"],
["text"," activeSwatch"],
["keyword.operator.symbolic.actionscript.2",":"],
["support.class.actionscript.2","MovieClip"],
["text",";"]
],[
"start",
["text","\t\t"]
],[
"start",
["text","\t\t"],
["punctuation.definition.comment.actionscript.2","//"],
["comment.line.double-slash.actionscript.2"," Color offsets"]
],[
"start",
["text","\t\t"],
["keyword.control.actionscript.2","public"],
["text"," "],
["keyword.control.actionscript.2","var"],
["text"," c1"],
["keyword.operator.symbolic.actionscript.2",":"],
["storage.type.actionscript.2","Number"],
["text"," "],
["keyword.operator.symbolic.actionscript.2","="],
["text"," "],
["constant.numeric.actionscript.2","0"],
["text",";\t"],
["punctuation.definition.comment.actionscript.2","//"],
["comment.line.double-slash.actionscript.2"," R"]
],[
"start",
["text","\t\t"]
],[
"start",
["text","\t\t"],
["punctuation.definition.comment.actionscript.2","//"],
["comment.line.double-slash.actionscript.2","*************************"]
],[
"start",
["text","\t\t"],
["punctuation.definition.comment.actionscript.2","//"],
["comment.line.double-slash.actionscript.2"," Constructor:"]
],[
"start",
["text","\t\t"]
],[
"start",
["text","\t\t"],
["keyword.control.actionscript.2","public"],
["text"," "],
["storage.type.function.actionscript.2","function"],
["meta.function.actionscript.2"," "],
["entity.name.function.actionscript.2","Foo"],
["punctuation.definition.parameters.begin.actionscript.2","("],
["punctuation.definition.parameters.end.actionscript.2",")"]
],[
"start",
["text","\t\t{"]
],[
"start",
["text","\t\t\t"],
["punctuation.definition.comment.actionscript.2","//"],
["comment.line.double-slash.actionscript.2"," Respond to mouse events"]
],[
"start",
["text","\t\t\tswatch1_btn."],
["support.function.actionscript.2","addEventListener"],
["text","(MouseEvent.CLICK,swatchHandler,"],
["constant.language.actionscript.2","false"],
["text",","],
["constant.numeric.actionscript.2","0"],
["text",","],
["constant.language.actionscript.2","false"],
["text",");"]
],[
"start",
["text","\t\t\tpreviewBox_btn."],
["support.function.actionscript.2","addEventListener"],
["text","(MouseEvent.MOUSE_DOWN,dragPressHandler);"]
],[
"start",
["text","\t\t\t"]
],[
"start",
["text","\t\t\t"],
["punctuation.definition.comment.actionscript.2","//"],
["comment.line.double-slash.actionscript.2"," Respond to drag events"]
],[
"start",
["text","\t\t\tred_slider."],
["support.function.actionscript.2","addEventListener"],
["text","(SliderEvent.THUMB_DRAG,sliderHandler);"]
],[
"start",
["text","\t\t\t"]
],[
"start",
["text","\t\t\t"],
["punctuation.definition.comment.actionscript.2","//"],
["comment.line.double-slash.actionscript.2"," Draw a frame later"]
],[
"start",
["text","\t\t\t"],
["support.function.actionscript.2","addEventListener"],
["text","(Event.ENTER_FRAME,"],
["support.function.actionscript.2","draw"],
["text",");"]
],[
"start",
["text","\t\t}"]
],[
"start",
["text"," "]
],[
"start",
["text","\t\tprotected "],
["storage.type.function.actionscript.2","function"],
["meta.function.actionscript.2"," "],
["entity.name.function.actionscript.2","clickHandler"],
["punctuation.definition.parameters.begin.actionscript.2","("],
["variable.parameter.function.actionscript.2","event:MouseEvent"],
["punctuation.definition.parameters.end.actionscript.2",")"],
["keyword.operator.symbolic.actionscript.2",":"],
["support.function.actionscript.2","void"]
],[
"start",
["text","\t\t{"]
],[
"start",
["text","\t\t\tcar.transform.colorTransform "],
["keyword.operator.symbolic.actionscript.2","="],
["text"," "],
["keyword.control.actionscript.2","new"],
["text"," ColorTransform("],
["constant.numeric.actionscript.2","0"],
["text",","],
["constant.numeric.actionscript.2","0"],
["text",","],
["constant.numeric.actionscript.2","0"],
["text",","],
["constant.numeric.actionscript.2","1"],
["text",",c1,c2,c3);"]
],[
"start",
["text","\t\t}"]
],[
"start",
["text","\t\t"]
],[
"start",
["text","\t\tprotected "],
["storage.type.function.actionscript.2","function"],
["meta.function.actionscript.2"," "],
["entity.name.function.actionscript.2","changeRGBHandler"],
["punctuation.definition.parameters.begin.actionscript.2","("],
["variable.parameter.function.actionscript.2","event:Event"],
["punctuation.definition.parameters.end.actionscript.2",")"],
["keyword.operator.symbolic.actionscript.2",":"],
["support.function.actionscript.2","void"]
],[
"start",
["text","\t\t{"]
],[
"start",
["text","\t\t\tc1 "],
["keyword.operator.symbolic.actionscript.2","="],
["text"," "],
["storage.type.actionscript.2","Number"],
["text","(c1_txt."],
["support.function.actionscript.2","text"],
["text",");"]
],[
"start",
["text"," "]
],[
"start",
["text","\t\t\t"],
["keyword.control.actionscript.2","if"],
["text","("],
["keyword.operator.symbolic.actionscript.2","!"],
["text","(c1>"],
["keyword.operator.symbolic.actionscript.2","="],
["constant.numeric.actionscript.2","0"],
["text",")){"]
],[
"start",
["text","\t\t\t\tc1 "],
["keyword.operator.symbolic.actionscript.2","="],
["text"," "],
["constant.numeric.actionscript.2","0"],
["text",";"]
],[
"start",
["text","\t\t\t}\t\t\t"]
],[
"start",
["text","\t\t\t"]
],[
"start",
["text","\t\t\tupdateSliders();"]
],[
"start",
["text","\t\t}"]
],[
"start",
["text","\t}"]
],[
"start",
["text","}"]
]]

View file

@ -0,0 +1,169 @@
[[
"start",
["text"," "],
["punctuation.definition.comment.erlang","%"],
["comment.line.percentage.erlang","% A process whose only job is to keep a counter."]
],[
"start",
["text"," "],
["punctuation.definition.comment.erlang","%"],
["comment.line.percentage.erlang","% First version"]
],[
"start",
["meta.directive.module.erlang"," "],
["punctuation.section.directive.begin.erlang","-"],
["keyword.control.directive.module.erlang","module"],
["punctuation.definition.parameters.begin.erlang","("],
["entity.name.type.class.module.definition.erlang","counter"],
["punctuation.definition.parameters.end.erlang",")"],
["punctuation.section.directive.end.erlang","."]
],[
"start",
["meta.directive.export.erlang"," "],
["punctuation.section.directive.begin.erlang","-"],
["keyword.control.directive.export.erlang","export"],
["punctuation.definition.parameters.begin.erlang","("],
["punctuation.definition.list.begin.erlang","["],
["entity.name.function.erlang","start"],
["punctuation.separator.function-arity.erlang","/"],
["constant.numeric.integer.decimal.erlang","0"],
["punctuation.separator.list.erlang",","],
["meta.structure.list.function.erlang"," "],
["entity.name.function.erlang","codeswitch"],
["punctuation.separator.function-arity.erlang","/"],
["constant.numeric.integer.decimal.erlang","1"],
["punctuation.definition.list.end.erlang","]"],
["punctuation.definition.parameters.end.erlang",")"],
["punctuation.section.directive.end.erlang","."]
],[
"start",
["text"," "]
],[
"start",
["meta.function.erlang"," "],
["entity.name.function.definition.erlang","start"],
["punctuation.section.expression.begin.erlang","("],
["punctuation.section.expression.end.erlang",")"],
["text"," "],
["keyword.operator.symbolic.erlang","->"],
["text"," "],
["entity.name.function.erlang","loop"],
["punctuation.definition.parameters.begin.erlang","("],
["constant.numeric.integer.decimal.erlang","0"],
["punctuation.definition.parameters.end.erlang",")"],
["punctuation.terminator.function.erlang","."]
],[
"start",
["text"," "]
],[
["text6","meta.function.erlang"],
["meta.function.erlang"," "],
["entity.name.function.definition.erlang","loop"],
["punctuation.section.expression.begin.erlang","("],
["variable.other.erlang","Sum"],
["punctuation.section.expression.end.erlang",")"],
["text"," "],
["keyword.operator.symbolic.erlang","->"]
],[
["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
["text"," "],
["keyword.control.receive.erlang","receive"]
],[
["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
["meta.expression.receive.erlang"," "],
["punctuation.definition.tuple.begin.erlang","{"],
["constant.other.symbol.unquoted.erlang","increment"],
["punctuation.separator.tuple.erlang",","],
["meta.structure.tuple.erlang"," "],
["variable.other.erlang","Count"],
["punctuation.definition.tuple.end.erlang","}"],
["meta.expression.receive.erlang"," "],
["punctuation.separator.clause-head-body.erlang","->"]
],[
["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
["meta.expression.receive.erlang"," "],
["entity.name.function.erlang","loop"],
["punctuation.definition.parameters.begin.erlang","("],
["variable.other.erlang","Sum"],
["keyword.operator.symbolic.erlang","+"],
["variable.other.erlang","Count"],
["punctuation.definition.parameters.end.erlang",")"],
["punctuation.separator.clauses.erlang",";"]
],[
["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
["meta.expression.receive.erlang"," "],
["punctuation.definition.tuple.begin.erlang","{"],
["constant.other.symbol.unquoted.erlang","counter"],
["punctuation.separator.tuple.erlang",","],
["meta.structure.tuple.erlang"," "],
["variable.other.erlang","Pid"],
["punctuation.definition.tuple.end.erlang","}"],
["meta.expression.receive.erlang"," "],
["punctuation.separator.clause-head-body.erlang","->"]
],[
["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
["meta.expression.receive.erlang"," "],
["variable.other.erlang","Pid"],
["meta.expression.receive.erlang"," "],
["keyword.operator.symbolic.erlang","!"],
["meta.expression.receive.erlang"," "],
["punctuation.definition.tuple.begin.erlang","{"],
["constant.other.symbol.unquoted.erlang","counter"],
["punctuation.separator.tuple.erlang",","],
["meta.structure.tuple.erlang"," "],
["variable.other.erlang","Sum"],
["punctuation.definition.tuple.end.erlang","}"],
["punctuation.separator.expressions.erlang",","]
],[
["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
["meta.expression.receive.erlang"," "],
["entity.name.function.erlang","loop"],
["punctuation.definition.parameters.begin.erlang","("],
["variable.other.erlang","Sum"],
["punctuation.definition.parameters.end.erlang",")"],
["punctuation.separator.clauses.erlang",";"]
],[
["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
["meta.expression.receive.erlang"," "],
["constant.other.symbol.unquoted.erlang","code_switch"],
["meta.expression.receive.erlang"," "],
["punctuation.separator.clause-head-body.erlang","->"]
],[
["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
["meta.expression.receive.erlang"," "],
["keyword.operator.macro.erlang","?"],
["entity.name.function.macro.erlang","MODULE"],
["meta.expression.receive.erlang",":"],
["entity.name.function.erlang","codeswitch"],
["punctuation.definition.parameters.begin.erlang","("],
["variable.other.erlang","Sum"],
["punctuation.definition.parameters.end.erlang",")"]
],[
["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
["meta.expression.receive.erlang"," "],
["punctuation.definition.comment.erlang","%"],
["comment.line.percentage.erlang"," Force the use of 'codeswitch/1' from the latest MODULE version"]
],[
"start",
["meta.expression.receive.erlang"," "],
["keyword.control.end.erlang","end"],
["punctuation.terminator.function.erlang","."]
],[
"start",
["text"," "]
],[
"start",
["meta.function.erlang"," "],
["entity.name.function.definition.erlang","codeswitch"],
["punctuation.section.expression.begin.erlang","("],
["variable.other.erlang","Sum"],
["punctuation.section.expression.end.erlang",")"],
["text"," "],
["keyword.operator.symbolic.erlang","->"],
["text"," "],
["entity.name.function.erlang","loop"],
["punctuation.definition.parameters.begin.erlang","("],
["variable.other.erlang","Sum"],
["punctuation.definition.parameters.end.erlang",")"],
["punctuation.terminator.function.erlang","."]
]]

View file

@ -0,0 +1,219 @@
[[
"start",
["keyword.other.compile-only.forth",":"],
["meta.block.forth"," "],
["entity.name.function.forth","HELLO"],
["meta.block.forth"," "],
["comment.line.parentheses.forth"," ( -- )"],
["meta.block.forth"," CR "],
["string.quoted.double.forth",".\" Hello, world!\""],
["meta.block.forth"," "],
["keyword.other.compile-only.forth",";"],
["text"," "]
],[
"start"
],[
"start",
["text","HELLO <cr>"]
],[
"start",
["text","Hello, world!"]
],[
"start"
],[
"start",
["keyword.other.compile-only.forth",":"],
["meta.block.forth"," "],
["entity.name.function.forth","[CHAR]"],
["meta.block.forth"," "],
["keyword.other.non-immediate.forth"," CHAR"],
["meta.block.forth"," "],
["keyword.other.compile-only.forth"," POSTPONE"],
["meta.block.forth"," LITERAL "],
["keyword.other.compile-only.forth",";"],
["keyword.other.immediate.forth"," IMMEDIATE"]
],[
"start"
],[
"start",
["constant.numeric.forth","0"],
["storage.type.forth"," value"],
["text"," ii "],
["constant.numeric.forth"," 0"],
["storage.type.forth"," value"],
["text"," jj"]
],[
"start",
["constant.numeric.forth","0"],
["storage.type.forth"," value"],
["text"," KeyAddr "],
["constant.numeric.forth"," 0"],
["storage.type.forth"," value"],
["text"," KeyLen"]
],[
"start",
["storage.type.forth","create"],
["text"," SArray "],
["constant.numeric.forth"," 256"],
["text"," allot "],
["comment.line.backslash.forth"," \\ state array of 256 bytes"]
],[
"start",
["keyword.other.compile-only.forth",":"],
["meta.block.forth"," "],
["entity.name.function.forth","KeyArray"],
["meta.block.forth"," KeyLen mod KeyAddr "],
["keyword.other.compile-only.forth",";"]
],[
"start"
],[
"start",
["keyword.other.compile-only.forth",":"],
["meta.block.forth"," "],
["entity.name.function.forth","get_byte"],
["meta.block.forth"," + c@ "],
["keyword.other.compile-only.forth",";"]
],[
"start",
["keyword.other.compile-only.forth",":"],
["meta.block.forth"," "],
["entity.name.function.forth","set_byte"],
["meta.block.forth"," + c! "],
["keyword.other.compile-only.forth",";"]
],[
"start",
["keyword.other.compile-only.forth",":"],
["meta.block.forth"," "],
["entity.name.function.forth","as_byte"],
["meta.block.forth"," "],
["constant.numeric.forth"," 255"],
["meta.block.forth"," and "],
["keyword.other.compile-only.forth",";"]
],[
"start",
["keyword.other.compile-only.forth",":"],
["meta.block.forth"," "],
["entity.name.function.forth","reset_ij"],
["meta.block.forth"," "],
["constant.numeric.forth"," 0"],
["keyword.other.immediate.forth"," TO"],
["meta.block.forth"," ii "],
["constant.numeric.forth"," 0"],
["keyword.other.immediate.forth"," TO"],
["meta.block.forth"," jj "],
["keyword.other.compile-only.forth",";"]
],[
"start",
["keyword.other.compile-only.forth",":"],
["meta.block.forth"," "],
["entity.name.function.forth","i_update"],
["meta.block.forth"," "],
["constant.numeric.forth"," 1"],
["meta.block.forth"," + as_byte"],
["keyword.other.immediate.forth"," TO"],
["meta.block.forth"," ii "],
["keyword.other.compile-only.forth",";"]
],[
"start",
["keyword.other.compile-only.forth",":"],
["meta.block.forth"," "],
["entity.name.function.forth","j_update"],
["meta.block.forth"," ii SArray get_byte + as_byte"],
["keyword.other.immediate.forth"," TO"],
["meta.block.forth"," jj "],
["keyword.other.compile-only.forth",";"]
],[
"keyword.other.compile-only.forth",
["keyword.other.compile-only.forth",":"],
["meta.block.forth"," "],
["entity.name.function.forth","swap_s_ij"]
],[
"keyword.other.compile-only.forth",
["meta.block.forth"," jj SArray get_byte"]
],[
"keyword.other.compile-only.forth",
["meta.block.forth"," ii SArray get_byte jj SArray set_byte"]
],[
"keyword.other.compile-only.forth",
["meta.block.forth"," ii SArray set_byte"]
],[
"start",
["keyword.other.compile-only.forth",";"]
],[
"start"
],[
"keyword.other.compile-only.forth",
["keyword.other.compile-only.forth",":"],
["meta.block.forth"," "],
["entity.name.function.forth","rc4_init"],
["comment.line.parentheses.forth"," ( KeyAddr KeyLen -- )"]
],[
"keyword.other.compile-only.forth",
["meta.block.forth"," "],
["constant.numeric.forth"," 256"],
["meta.block.forth"," min"],
["keyword.other.immediate.forth"," TO"],
["meta.block.forth"," KeyLen "],
["keyword.other.immediate.forth"," TO"],
["meta.block.forth"," KeyAddr"]
],[
"keyword.other.compile-only.forth",
["meta.block.forth"," "],
["constant.numeric.forth"," 256 0"],
["keyword.control.compile-only.forth"," DO"],
["meta.block.forth"," "],
["variable.language.forth","i"],
["meta.block.forth"," "],
["variable.language.forth","i"],
["meta.block.forth"," SArray set_byte "],
["keyword.control.compile-only.forth"," LOOP"]
],[
"keyword.other.compile-only.forth",
["meta.block.forth"," reset_ij"]
],[
"keyword.other.compile-only.forth",
["meta.block.forth"," "],
["keyword.control.compile-only.forth"," BEGIN"]
],[
"keyword.other.compile-only.forth",
["meta.block.forth"," ii KeyArray get_byte jj + j_update"]
],[
"keyword.other.compile-only.forth",
["meta.block.forth"," swap_s_ij"]
],[
"keyword.other.compile-only.forth",
["meta.block.forth"," ii"],
["constant.numeric.forth"," 255"],
["meta.block.forth"," <"],
["keyword.control.compile-only.forth"," WHILE"]
],[
"keyword.other.compile-only.forth",
["meta.block.forth"," ii i_update"]
],[
"keyword.other.compile-only.forth",
["meta.block.forth"," "],
["keyword.control.compile-only.forth"," REPEAT"]
],[
"keyword.other.compile-only.forth",
["meta.block.forth"," reset_ij"]
],[
"start",
["keyword.other.compile-only.forth",";"]
],[
"keyword.other.compile-only.forth",
["keyword.other.compile-only.forth",":"],
["meta.block.forth"," "],
["entity.name.function.forth","rc4_byte"]
],[
"keyword.other.compile-only.forth",
["meta.block.forth"," ii i_update jj j_update"]
],[
"keyword.other.compile-only.forth",
["meta.block.forth"," swap_s_ij"]
],[
"keyword.other.compile-only.forth",
["meta.block.forth"," ii SArray get_byte jj SArray get_byte + as_byte SArray get_byte xor"]
],[
"start",
["keyword.other.compile-only.forth",";"]
]]

View file

@ -0,0 +1,337 @@
[[
"start",
["keyword.function","<#ftl"],
["text"," "],
["entity.other.attribute-name","encoding"],
["keyword.operator","="],
["string","\"utf-8\""],
["text"," "],
["keyword","/>"]
],[
"start",
["keyword.function","<#setting"],
["text"," "],
["entity.other.attribute-name","locale"],
["keyword.operator","="],
["string","\"en_US\""],
["text"," "],
["keyword","/>"]
],[
"start",
["keyword.function","<#import"],
["text"," "],
["string","\"library\""],
["text"," "],
["keyword.operator","as"],
["text"," "],
["variable","lib"],
["text"," "],
["keyword","/>"]
],[
"comment",
["comment","<#--"]
],[
"comment",
["comment"," FreeMarker comment"]
],[
"comment",
["comment"," ${abc} <#assign a=12 />"]
],[
"start",
["comment","-->"]
],[
"start"
],[
"start",
["xml-pe","<!DOCTYPE html>"]
],[
"start",
["meta.tag","<"],
["meta.tag.tag-name","html"],
["text"," "],
["entity.other.attribute-name","lang"],
["keyword.operator","="],
["string","\"en-us\""],
["meta.tag.r",">"]
],[
"start",
["text"," "],
["meta.tag","<"],
["meta.tag.tag-name","head"],
["meta.tag.r",">"]
],[
"start",
["text"," "],
["meta.tag","<"],
["meta.tag.tag-name","meta"],
["text"," "],
["entity.other.attribute-name","charset"],
["keyword.operator","="],
["string","\"utf-8\""],
["text"," "],
["meta.tag.r","/>"]
],[
"start",
["text"," "]
],[
"start",
["text"," "],
["meta.tag","<"],
["meta.tag.tag-name","title"],
["meta.tag.r",">"],
["string.interpolated","${"],
["variable","title"],
["keyword.operator","!"],
["string","\"FreeMarker\""],
["string.interpolated","}"],
["meta.tag","<"],
["meta.tag.tag-name","title"],
["meta.tag.r",">"]
],[
"start",
["text"," "],
["meta.tag","</"],
["meta.tag.tag-name","head"],
["meta.tag.r",">"]
],[
"start",
["text"," "]
],[
"start",
["text"," "],
["meta.tag","<"],
["meta.tag.tag-name","body"],
["meta.tag.r",">"]
],[
"start",
["text"," "]
],[
"start",
["text"," "],
["meta.tag","<"],
["meta.tag.tag-name","h1"],
["meta.tag.r",">"],
["text","Hello "],
["string.interpolated","${"],
["variable","name"],
["keyword.operator","!"],
["string","\"\""],
["string.interpolated","}"],
["meta.tag","</"],
["meta.tag.tag-name","h1"],
["meta.tag.r",">"]
],[
"start",
["text"," "]
],[
"start",
["text"," "],
["meta.tag","<"],
["meta.tag.tag-name","p"],
["meta.tag.r",">"],
["text","Today is: "],
["string.interpolated","${"],
["language.variable",".now"],
["support.function","?date"],
["string.interpolated","}"],
["meta.tag","</"],
["meta.tag.tag-name","p"],
["meta.tag.r",">"]
],[
"start",
["text"," "]
],[
"start",
["text"," "],
["keyword.function","<#assign"],
["text"," "],
["variable","x"],
["text"," "],
["keyword.operator","="],
["text"," "],
["constant.numeric","13"],
["keyword",">"]
],[
"start",
["text"," "],
["keyword.function","<#if"],
["text"," "],
["variable","x"],
["text"," "],
["constant.character.entity","&gt;"],
["text"," "],
["constant.numeric","12"],
["text"," "],
["keyword.operator","&&"],
["text"," "],
["variable","x"],
["text"," "],
["keyword.operator","lt"],
["text"," "],
["constant.numeric","14"],
["keyword",">"],
["text","x equals 13: "],
["string.interpolated","${"],
["variable","x"],
["string.interpolated","}"],
["keyword.function","</#if"],
["keyword",">"]
],[
"start",
["text"," "]
],[
"start",
["text"," "],
["meta.tag","<"],
["meta.tag.tag-name","ul"],
["meta.tag.r",">"]
],[
"start",
["text"," "],
["keyword.function","<#list"],
["text"," "],
["variable","items"],
["text"," "],
["keyword.operator","as"],
["text"," "],
["variable","item"],
["keyword",">"]
],[
"start",
["text"," "],
["meta.tag","<"],
["meta.tag.tag-name","li"],
["meta.tag.r",">"],
["string.interpolated","${"],
["variable","item_index"],
["string.interpolated","}"],
["text",": "],
["string.interpolated","${"],
["variable","item.name"],
["keyword.operator","!"],
["support.function","?split"],
["paren.lparen","("],
["string","\""],
["constant.character.escape","\\n"],
["string","\""],
["paren.rparen",")"],
["paren.lparen","["],
["constant.numeric","0"],
["paren.rparen","]"],
["string.interpolated","}"],
["meta.tag","</"],
["meta.tag.tag-name","li"],
["meta.tag.r",">"]
],[
"start",
["text"," "],
["keyword.function","</#list"],
["keyword",">"]
],[
"start",
["text"," "],
["meta.tag","</"],
["meta.tag.tag-name","ul"],
["meta.tag.r",">"]
],[
"start",
["text"," "]
],[
"start",
["text"," User directive: "],
["keyword.other","<@lib.function"],
["text"," "],
["variable","attr1"],
["keyword.operator","="],
["constant.language","true"],
["text"," "],
["variable","attr2"],
["keyword.operator","="],
["string","'value'"],
["text"," "],
["variable","attr3"],
["keyword.operator","="],
["constant.numeric","-42.12"],
["keyword",">"],
["text","Test"],
["keyword.other","</@lib.function"],
["keyword",">"]
],[
"start",
["text"," "],
["keyword.other","<@anotherOne"],
["text"," "],
["keyword","/>"]
],[
"start",
["text"," "]
],[
"start",
["text"," "],
["keyword.function","<#if"],
["text"," "],
["variable","variable"],
["support.function.deprecated","?exists"],
["keyword",">"]
],[
"start",
["text"," Deprecated"]
],[
"start",
["text"," "],
["keyword.function","<#elseif"],
["text"," "],
["variable","variable"],
["support.function","??"],
["keyword",">"]
],[
"start",
["text"," Better"]
],[
"start",
["text"," "],
["keyword.function","<#else"],
["keyword",">"]
],[
"start",
["text"," Default"]
],[
"start",
["text"," "],
["keyword.function","</#if"],
["keyword",">"]
],[
"start",
["text"," "]
],[
"start",
["text"," "],
["meta.tag","<"],
["meta.tag.tag-name.image","img"],
["text"," "],
["entity.other.attribute-name","src"],
["keyword.operator","="],
["string","\"images/"],
["string.interpolated","${"],
["variable","user.id"],
["string.interpolated","}"],
["string",".png\""],
["text"," "],
["meta.tag.r","/>"]
],[
"start",
["text"," "]
],[
"start",
["text"," "],
["meta.tag","</"],
["meta.tag.tag-name","body"],
["meta.tag.r",">"]
],[
"start",
["meta.tag","</"],
["meta.tag.tag-name","html"],
["meta.tag.r",">"]
],[
"start"
]]

View file

@ -0,0 +1,162 @@
[[
"start",
["punctuation.definition.comment.haskell","--"],
["comment.line.double-dash.haskell"," Type annotation (optional)"]
],[
"start",
["entity.name.function.haskell","fib"],
["meta.function.type-declaration.haskell"," "],
["keyword.other.double-colon.haskell","::"],
["meta.function.type-declaration.haskell"," "],
["support.type.prelude.haskell","Int"],
["meta.function.type-declaration.haskell"," "],
["keyword.other.arrow.haskell","->"],
["meta.function.type-declaration.haskell"," "],
["support.type.prelude.haskell","Integer"]
],[
"start",
["text"," "]
],[
"start",
["punctuation.definition.comment.haskell","--"],
["comment.line.double-dash.haskell"," With self-referencing data"]
],[
"start",
["text","fib n "],
["keyword.operator.haskell","="],
["text"," fibs "],
["keyword.operator.haskell","!!"],
["text"," n"]
],[
"start",
["text"," "],
["keyword.other.haskell","where"],
["text"," fibs "],
["keyword.operator.haskell","="],
["text"," "],
["constant.numeric.haskell","0"],
["text"," "],
["keyword.operator.haskell",":"],
["text"," "],
["support.function.prelude.haskell","scanl"],
["text"," "],
["entity.name.function.infix.haskell","(+)"],
["text"," "],
["constant.numeric.haskell","1"],
["text"," fibs"]
],[
"start",
["text"," "],
["punctuation.definition.comment.haskell","--"],
["comment.line.double-dash.haskell"," 0,1,1,2,3,5,..."]
],[
"start",
["text"," "]
],[
"start",
["punctuation.definition.comment.haskell","--"],
["comment.line.double-dash.haskell"," Same, coded directly"]
],[
"start",
["text","fib n "],
["keyword.operator.haskell","="],
["text"," fibs "],
["keyword.operator.haskell","!!"],
["text"," n"]
],[
"start",
["text"," "],
["keyword.other.haskell","where"],
["text"," fibs "],
["keyword.operator.haskell","="],
["text"," "],
["constant.numeric.haskell","0"],
["text"," "],
["keyword.operator.haskell",":"],
["text"," "],
["constant.numeric.haskell","1"],
["text"," "],
["keyword.operator.haskell",":"],
["text"," next fibs"]
],[
"start",
["text"," next (a "],
["keyword.operator.haskell",":"],
["text"," t@(b"],
["keyword.operator.haskell",":"],
["text","_)) "],
["keyword.operator.haskell","="],
["text"," (a"],
["keyword.operator.haskell","+"],
["text","b) "],
["keyword.operator.haskell",":"],
["text"," next t"]
],[
"start",
["text"," "]
],[
"start",
["punctuation.definition.comment.haskell","--"],
["comment.line.double-dash.haskell"," Similar idea, using zipWith"]
],[
"start",
["text","fib n "],
["keyword.operator.haskell","="],
["text"," fibs "],
["keyword.operator.haskell","!!"],
["text"," n"]
],[
"start",
["text"," "],
["keyword.other.haskell","where"],
["text"," fibs "],
["keyword.operator.haskell","="],
["text"," "],
["constant.numeric.haskell","0"],
["text"," "],
["keyword.operator.haskell",":"],
["text"," "],
["constant.numeric.haskell","1"],
["text"," "],
["keyword.operator.haskell",":"],
["text"," "],
["support.function.prelude.haskell","zipWith"],
["text"," "],
["entity.name.function.infix.haskell","(+)"],
["text"," fibs ("],
["support.function.prelude.haskell","tail"],
["text"," fibs)"]
],[
"start",
["text"," "]
],[
"start",
["punctuation.definition.comment.haskell","--"],
["comment.line.double-dash.haskell"," Using a generator function"]
],[
"start",
["text","fib n "],
["keyword.operator.haskell","="],
["text"," fibs ("],
["constant.numeric.haskell","0"],
["punctuation.separator.comma.haskell",","],
["constant.numeric.haskell","1"],
["text",") "],
["keyword.operator.haskell","!!"],
["text"," n"]
],[
"start",
["text"," "],
["keyword.other.haskell","where"],
["text"," fibs (a"],
["punctuation.separator.comma.haskell",","],
["text","b) "],
["keyword.operator.haskell","="],
["text"," a "],
["keyword.operator.haskell",":"],
["text"," fibs (b"],
["punctuation.separator.comma.haskell",","],
["text","a"],
["keyword.operator.haskell","+"],
["text","b)"]
]]

View file

@ -0,0 +1,105 @@
[[
"start",
["keyword.control.julia","for"],
["text"," op "],
["keyword.operator.update.julia","="],
["text"," ("],
["keyword.operator.ternary.julia",":"],
["keyword.operator.arithmetic.julia","+"],
["text",", "],
["keyword.operator.ternary.julia",":"],
["keyword.operator.arithmetic.julia","*"],
["text",", "],
["keyword.operator.ternary.julia",":"],
["keyword.operator.bitwise.julia","&"],
["text",", "],
["keyword.operator.ternary.julia",":"],
["keyword.operator.bitwise.julia","|"],
["text",", "],
["keyword.operator.ternary.julia",":"],
["keyword.operator.interpolation.julia","$"],
["text",")"]
],[
"start",
["text"," "],
["variable.macro.julia","@eval"],
["text"," ("],
["keyword.operator.interpolation.julia","$"],
["text","op)(a,b,c) "],
["keyword.operator.update.julia","="],
["text"," ("],
["keyword.operator.interpolation.julia","$"],
["text","op)(("],
["keyword.operator.interpolation.julia","$"],
["text","op)(a,b),c)"]
],[
"start",
["keyword.control.julia","end"]
],[
"start"
],[
"start"
],[
"start",
["keyword.other.julia","function"],
["meta.function.julia"," "],
["entity.name.function.julia","g"],
["text","("],
["text","x,y)"]
],[
"start",
["text"," "],
["keyword.control.julia","return"],
["text"," x "],
["keyword.operator.arithmetic.julia","*"],
["text"," y"]
],[
"start",
["text"," x "],
["keyword.operator.arithmetic.julia","+"],
["text"," y"]
],[
"start",
["keyword.control.julia","end"]
],[
"start"
],[
"start",
["support.function.julia","cd"],
["text","("],
["punctuation.definition.string.begin.julia","\""],
["string.quoted.double.julia","data"],
["punctuation.definition.string.end.julia","\""],
["text",") "],
["keyword.control.julia","do"]
],[
"start",
["text"," "],
["support.function.julia","open"],
["text","("],
["punctuation.definition.string.begin.julia","\""],
["string.quoted.double.julia","outfile"],
["punctuation.definition.string.end.julia","\""],
["text",", "],
["punctuation.definition.string.begin.julia","\""],
["string.quoted.double.julia","w"],
["punctuation.definition.string.end.julia","\""],
["text",") "],
["keyword.control.julia","do"],
["text"," f"]
],[
"start",
["text"," "],
["support.function.julia","write"],
["text","("],
["text","f, data)"]
],[
"start",
["text"," "],
["keyword.control.julia","end"]
],[
"start",
["keyword.control.julia","end"]
],[
"start"
]]

View file

@ -0,0 +1,6 @@
[[
"start",
["comment","# comment"]
],[
"start"
]]

View file

@ -1,12 +1,12 @@
[[
"punctuation.definition.comment.pascal2",
"punctuation.definition.comment.pascal1",
["punctuation.definition.comment.pascal","(*"],
["comment.block.pascal.one","****************************************************************************"]
],[
"punctuation.definition.comment.pascal2",
"punctuation.definition.comment.pascal1",
["comment.block.pascal.one"," * A simple bubble sort program. Reads integers, one per line, and prints *"]
],[
"punctuation.definition.comment.pascal2",
"punctuation.definition.comment.pascal1",
["comment.block.pascal.one"," * them out in sorted order. Blows up if there are more than 49. *"]
],[
"start",

View file

@ -0,0 +1,265 @@
[[
"start",
["entity.name.function.fact.prolog","partition"],
["punctuation.begin.fact.parameters.prolog","("],
["punctuation.begin.list.prolog","["],
["punctuation.end.list.prolog","]"],
["punctuation.separator.parameters.prolog",","],
["meta.fact.prolog"," "],
["variable.language.anonymous.prolog","_"],
["punctuation.separator.parameters.prolog",","],
["meta.fact.prolog"," "],
["punctuation.begin.list.prolog","["],
["punctuation.end.list.prolog","]"],
["punctuation.separator.parameters.prolog",","],
["meta.fact.prolog"," "],
["punctuation.begin.list.prolog","["],
["punctuation.end.list.prolog","]"],
["punctuation.end.fact.parameters.prolog",")"],
["punctuation.end.fact.prolog","."]
],[
["keyword.operator.definition.prolog","meta.rule.prolog"],
["entity.name.function.rule.prolog","partition"],
["punctuation.rule.parameters.begin.prolog","("],
["punctuation.begin.list.prolog","["],
["variable.other.prolog","X"],
["punctuation.concat.list.prolog","|"],
["variable.other.prolog","Xs"],
["punctuation.end.list.prolog","]"],
["punctuation.separator.parameters.prolog",","],
["meta.rule.parameters.prolog"," "],
["variable.parameter.prolog","Pivot"],
["punctuation.separator.parameters.prolog",","],
["meta.rule.parameters.prolog"," "],
["variable.parameter.prolog","Smalls"],
["punctuation.separator.parameters.prolog",","],
["meta.rule.parameters.prolog"," "],
["variable.parameter.prolog","Bigs"],
["punctuation.rule.parameters.end.prolog",")"],
["meta.rule.signature.prolog"," "],
["keyword.operator.definition.prolog",":-"]
],[
["meta.expression.prolog","keyword.operator.definition.prolog","keyword.operator.definition.prolog","meta.rule.prolog"],
["meta.rule.definition.prolog"," "],
["meta.expression.prolog","( "],
["variable.other.prolog","X"],
["meta.expression.prolog"," @"],
["keyword.operator.prolog","<"],
["meta.expression.prolog"," "],
["variable.other.prolog","Pivot"],
["meta.expression.prolog"," "],
["keyword.operator.prolog","->"]
],[
["meta.expression.prolog","keyword.operator.definition.prolog","keyword.operator.definition.prolog","meta.rule.prolog"],
["meta.expression.prolog"," "],
["variable.other.prolog","Smalls"],
["meta.expression.prolog"," "],
["keyword.operator.prolog","="],
["meta.expression.prolog"," "],
["punctuation.begin.list.prolog","["],
["variable.other.prolog","X"],
["punctuation.concat.list.prolog","|"],
["variable.other.prolog","Rest"],
["punctuation.end.list.prolog","]"],
["punctuation.control.and.prolog",","]
],[
["meta.expression.prolog","keyword.operator.definition.prolog","keyword.operator.definition.prolog","meta.rule.prolog"],
["meta.expression.prolog"," "],
["constant.other.atom.prolog","partition"],
["punctuation.begin.statement.parameters.prolog","("],
["variable.other.prolog","Xs"],
["punctuation.separator.statement.prolog",","],
["meta.statement.parameters.prolog"," "],
["variable.other.prolog","Pivot"],
["punctuation.separator.statement.prolog",","],
["meta.statement.parameters.prolog"," "],
["variable.other.prolog","Rest"],
["punctuation.separator.statement.prolog",","],
["meta.statement.parameters.prolog"," "],
["variable.other.prolog","Bigs"],
["punctuation.end.statement.parameters.prolog",")"]
],[
["meta.expression.prolog","keyword.operator.definition.prolog","keyword.operator.definition.prolog","meta.rule.prolog"],
["meta.expression.prolog"," "],
["punctuation.control.or.prolog",";"],
["meta.expression.prolog"," "],
["variable.other.prolog","Bigs"],
["meta.expression.prolog"," "],
["keyword.operator.prolog","="],
["meta.expression.prolog"," "],
["punctuation.begin.list.prolog","["],
["variable.other.prolog","X"],
["punctuation.concat.list.prolog","|"],
["variable.other.prolog","Rest"],
["punctuation.end.list.prolog","]"],
["punctuation.control.and.prolog",","]
],[
["meta.expression.prolog","keyword.operator.definition.prolog","keyword.operator.definition.prolog","meta.rule.prolog"],
["meta.expression.prolog"," "],
["constant.other.atom.prolog","partition"],
["punctuation.begin.statement.parameters.prolog","("],
["variable.other.prolog","Xs"],
["punctuation.separator.statement.prolog",","],
["meta.statement.parameters.prolog"," "],
["variable.other.prolog","Pivot"],
["punctuation.separator.statement.prolog",","],
["meta.statement.parameters.prolog"," "],
["variable.other.prolog","Smalls"],
["punctuation.separator.statement.prolog",","],
["meta.statement.parameters.prolog"," "],
["variable.other.prolog","Rest"],
["punctuation.end.statement.parameters.prolog",")"]
],[
"start",
["meta.expression.prolog"," )"],
["punctuation.rule.end.prolog","."]
],[
"start",
["text"," "]
],[
"entity.name.function.fact.prolog",
["entity.name.function.fact.prolog","quicksort"],
["punctuation.begin.fact.parameters.prolog","("],
["punctuation.begin.list.prolog","["],
["punctuation.end.list.prolog","]"],
["invalid.illegal.invalidchar.prolog",")"],
["meta.fact.prolog"," "],
["invalid.illegal.invalidchar.prolog","-"],
["keyword.operator.prolog","->"],
["meta.fact.prolog"," "],
["punctuation.begin.list.prolog","["],
["punctuation.end.list.prolog","]"],
["invalid.illegal.invalidchar.prolog","."]
],[
"entity.name.function.fact.prolog",
["constant.other.atom.prolog","quicksort"],
["punctuation.begin.statement.parameters.prolog","("],
["punctuation.begin.list.prolog","["],
["variable.other.prolog","X"],
["punctuation.concat.list.prolog","|"],
["variable.other.prolog","Xs"],
["punctuation.end.list.prolog","]"],
["punctuation.end.statement.parameters.prolog",")"],
["meta.fact.prolog"," "],
["invalid.illegal.invalidchar.prolog","-"],
["keyword.operator.prolog","->"]
],[
"entity.name.function.fact.prolog",
["meta.fact.prolog"," "],
["invalid.illegal.invalidchar.prolog","{"],
["meta.fact.prolog"," "],
["constant.other.atom.prolog","partition"],
["punctuation.begin.statement.parameters.prolog","("],
["variable.other.prolog","Xs"],
["punctuation.separator.statement.prolog",","],
["meta.statement.parameters.prolog"," "],
["variable.other.prolog","X"],
["punctuation.separator.statement.prolog",","],
["meta.statement.parameters.prolog"," "],
["variable.other.prolog","Smaller"],
["punctuation.separator.statement.prolog",","],
["meta.statement.parameters.prolog"," "],
["variable.other.prolog","Bigger"],
["punctuation.end.statement.parameters.prolog",")"],
["meta.fact.prolog"," "],
["invalid.illegal.invalidchar.prolog","}"],
["punctuation.separator.parameters.prolog",","]
],[
"entity.name.function.fact.prolog",
["meta.fact.prolog"," "],
["constant.other.atom.prolog","quicksort"],
["punctuation.begin.statement.parameters.prolog","("],
["variable.other.prolog","Smaller"],
["punctuation.end.statement.parameters.prolog",")"],
["punctuation.separator.parameters.prolog",","],
["meta.fact.prolog"," "],
["punctuation.begin.list.prolog","["],
["variable.other.prolog","X"],
["punctuation.end.list.prolog","]"],
["punctuation.separator.parameters.prolog",","],
["meta.fact.prolog"," "],
["constant.other.atom.prolog","quicksort"],
["punctuation.begin.statement.parameters.prolog","("],
["variable.other.prolog","Bigger"],
["punctuation.end.statement.parameters.prolog",")"],
["invalid.illegal.invalidchar.prolog","."]
],[
"entity.name.function.fact.prolog"
],[
"entity.name.function.fact.prolog",
["constant.other.atom.prolog","perfect"],
["punctuation.begin.statement.parameters.prolog","("],
["variable.other.prolog","N"],
["punctuation.end.statement.parameters.prolog",")"],
["meta.fact.prolog"," "],
["invalid.illegal.invalidchar.prolog",":-"]
],[
"entity.name.function.fact.prolog",
["meta.fact.prolog"," "],
["constant.other.atom.prolog","between"],
["punctuation.begin.statement.parameters.prolog","("],
["constant.numeric.prolog","1"],
["punctuation.separator.statement.prolog",","],
["meta.statement.parameters.prolog"," "],
["constant.other.atom.prolog","inf"],
["punctuation.separator.statement.prolog",","],
["meta.statement.parameters.prolog"," "],
["variable.other.prolog","N"],
["punctuation.end.statement.parameters.prolog",")"],
["punctuation.separator.parameters.prolog",","],
["meta.fact.prolog"," "],
["variable.parameter.prolog","U"],
["meta.fact.prolog"," "],
["keyword.operator.prolog","is"],
["meta.fact.prolog"," "],
["variable.parameter.prolog","N"],
["meta.fact.prolog"," "],
["invalid.illegal.invalidchar.prolog","//"],
["meta.fact.prolog"," "],
["constant.numeric.prolog","2"],
["punctuation.separator.parameters.prolog",","]
],[
"entity.name.function.fact.prolog",
["meta.fact.prolog"," "],
["constant.other.atom.prolog","findall"],
["punctuation.begin.statement.parameters.prolog","("],
["variable.other.prolog","D"],
["punctuation.separator.statement.prolog",","],
["meta.statement.parameters.prolog"," ("],
["constant.other.atom.prolog","between"],
["punctuation.begin.statement.parameters.prolog","("],
["constant.numeric.prolog","1"],
["punctuation.separator.statement.prolog",","],
["variable.other.prolog","U"],
["punctuation.separator.statement.prolog",","],
["variable.other.prolog","D"],
["punctuation.end.statement.parameters.prolog",")"],
["punctuation.separator.statement.prolog",","],
["meta.statement.parameters.prolog"," "],
["variable.other.prolog","N"],
["meta.statement.parameters.prolog"," "],
["constant.other.atom.prolog","mod"],
["meta.statement.parameters.prolog"," "],
["variable.other.prolog","D"],
["meta.statement.parameters.prolog"," "],
["keyword.operator.prolog","=:="],
["meta.statement.parameters.prolog"," "],
["constant.numeric.prolog","0"],
["punctuation.end.statement.parameters.prolog",")"],
["punctuation.separator.parameters.prolog",","],
["meta.fact.prolog"," "],
["variable.parameter.prolog","Ds"],
["invalid.illegal.invalidchar.prolog",")"],
["punctuation.separator.parameters.prolog",","]
],[
"entity.name.function.fact.prolog",
["meta.fact.prolog"," "],
["constant.other.atom.prolog","sumlist"],
["punctuation.begin.statement.parameters.prolog","("],
["variable.other.prolog","Ds"],
["punctuation.separator.statement.prolog",","],
["meta.statement.parameters.prolog"," "],
["variable.other.prolog","N"],
["punctuation.end.statement.parameters.prolog",")"],
["invalid.illegal.invalidchar.prolog","."]
]]

View file

@ -0,0 +1,136 @@
[[
"start",
["keyword.source.rust","use"],
["text"," "],
["support.constant","core::rand::"],
["text","RngUtil"],
["keyword.operator",";"]
],[
"start"
],[
"start",
["keyword.source.rust","fn"],
["meta.function.source.rust"," "],
["entity.name.function.source.rust","main"],
["meta.function.source.rust","("],
["text",") {"]
],[
"start",
["text"," "],
["keyword.source.rust","for"],
["text"," ["],
["string.quoted.double.source.rust","\"Alice\""],
["keyword.operator",","],
["text"," "],
["string.quoted.double.source.rust","\"Bob\""],
["keyword.operator",","],
["text"," "],
["string.quoted.double.source.rust","\"Carol\""],
["text","].each |&name| {"]
],[
"start",
["text"," "],
["keyword.source.rust","do"],
["text"," spawn {"]
],[
"start",
["text"," "],
["keyword.source.rust","let"],
["text"," v "],
["keyword.operator","="],
["text"," "],
["support.constant","rand::"],
["text","Rng().shuffle(["],
["constant.numeric.integer.source.rust","1"],
["keyword.operator",","],
["text"," "],
["constant.numeric.integer.source.rust","2"],
["keyword.operator",","],
["text"," "],
["constant.numeric.integer.source.rust","3"],
["text","])"],
["keyword.operator",";"]
],[
"start",
["text"," "],
["keyword.source.rust","for"],
["text"," v.each |&num| {"]
],[
"start",
["text"," print(fmt"],
["keyword.operator","!"],
["text","("],
["string.quoted.double.source.rust","\"%s says: '%d'"],
["constant.character.escape.source.rust","\\n"],
["string.quoted.double.source.rust","\""],
["keyword.operator",","],
["text"," name"],
["keyword.operator",","],
["text"," num "],
["keyword.operator","+"],
["text"," "],
["constant.numeric.integer.source.rust","1"],
["text","))"]
],[
"start",
["text"," }"]
],[
"start",
["text"," }"]
],[
"start",
["text"," }"]
],[
"start",
["text","}"]
],[
"start"
],[
"start",
["keyword.source.rust","fn"],
["meta.function.source.rust"," "],
["entity.name.function.source.rust","map<T, U>"],
["meta.function.source.rust","("],
["text","vector: &[T]"],
["keyword.operator",","],
["text"," function: &fn(v: &T) "],
["keyword.operator","->"],
["text"," U) "],
["keyword.operator","->"],
["text"," ~[U] {"]
],[
"start",
["text"," "],
["keyword.source.rust","let"],
["text"," "],
["keyword.source.rust","mut"],
["text"," accumulator "],
["keyword.operator","="],
["text"," ~[]"],
["keyword.operator",";"]
],[
"start",
["text"," "],
["keyword.source.rust","for"],
["text"," "],
["support.constant","vec::"],
["text","each(vector) |element| {"]
],[
"start",
["text"," accumulator.push(function(element))"],
["keyword.operator",";"]
],[
"start",
["text"," }"]
],[
"start",
["text"," "],
["keyword.source.rust","return"],
["text"," accumulator"],
["keyword.operator",";"]
],[
"start",
["text","}"]
],[
"start"
]]

View file

@ -79,11 +79,11 @@ var ForthHighlightRules = function() {
'#constant':
[ { token: 'constant.language.forth',
regex: '(?:^|\\s)(?:TRUE|FALSE|BL|PI|CELL|C/L|R/O|W/O|R/W)(?=\\s|$)',
caseInsensitive: true,
caseInsensitive: true},
{ token: 'constant.numeric.forth',
regex: '(?:^|\\s)[$#%]?[-+]?[0-9]+(?:\\.[0-9]*e-?[0-9]+|\\.?[0-9a-fA-F]*)(?=\\s|$)',
regex: '(?:^|\\s)[$#%]?[-+]?[0-9]+(?:\\.[0-9]*e-?[0-9]+|\\.?[0-9a-fA-F]*)(?=\\s|$)'},
{ token: 'constant.character.forth',
regex: '(?:^|\\s)(?:[&^]\\S|(?:"|\')\\S(?:"|\'))(?=\\s|$)',
regex: '(?:^|\\s)(?:[&^]\\S|(?:"|\')\\S(?:"|\'))(?=\\s|$)'}],
'#forth':
[ { include: '#constant' },
{ include: '#comment' },
@ -95,14 +95,14 @@ var ForthHighlightRules = function() {
'#storage':
[ { token: 'storage.type.forth',
regex: '(?:^|\\s)(?:2CONSTANT|2VARIABLE|ALIAS|CONSTANT|CREATE-INTERPRET/COMPILE[:]?|CREATE|DEFER|FCONSTANT|FIELD|FVARIABLE|USER|VALUE|VARIABLE|VOCABULARY)(?=\\s|$)',
caseInsensitive: true,
caseInsensitive: true}],
'#string':
[ { token: 'string.quoted.double.forth',
regex: '(ABORT" |BREAK" |\\." |C" |0"|S\\\\?" )([^"]+")',
caseInsensitive: true,
caseInsensitive: true},
{ token: 'string.unquoted.forth',
regex: '(?:INCLUDE|NEEDS|REQUIRE|USE)[ ]\\S+(?=\\s|$)',
caseInsensitive: true,
caseInsensitive: true}],
'#variable':
[ { token: 'variable.language.forth',
regex: '\\b(?:I|J)\\b',
@ -110,22 +110,22 @@ var ForthHighlightRules = function() {
'#word':
[ { token: 'keyword.control.immediate.forth',
regex: '(?:^|\\s)\\[(?:\\?DO|\\+LOOP|AGAIN|BEGIN|DEFINED|DO|ELSE|ENDIF|FOR|IF|IFDEF|IFUNDEF|LOOP|NEXT|REPEAT|THEN|UNTIL|WHILE)\\](?=\\s|$)',
caseInsensitive: true,
caseInsensitive: true},
{ token: 'keyword.other.immediate.forth',
regex: '(?:^|\\s)(?:COMPILE-ONLY|IMMEDIATE|IS|RESTRICT|TO|WHAT\'S|])(?=\\s|$)',
caseInsensitive: true,
caseInsensitive: true},
{ token: 'keyword.control.compile-only.forth',
regex: '(?:^|\\s)(?:-DO|\\-LOOP|\\?DO|\\?LEAVE|\\+DO|\\+LOOP|ABORT\\"|AGAIN|AHEAD|BEGIN|CASE|DO|ELSE|ENDCASE|ENDIF|ENDOF|ENDTRY\\-IFERROR|ENDTRY|FOR|IF|IFERROR|LEAVE|LOOP|NEXT|RECOVER|REPEAT|RESTORE|THEN|TRY|U\\-DO|U\\+DO|UNTIL|WHILE)(?=\\s|$)',
caseInsensitive: true,
caseInsensitive: true},
{ token: 'keyword.other.compile-only.forth',
regex: '(?:^|\\s)(?:\\?DUP-0=-IF|\\?DUP-IF|\\)|\\[|\\[\'\\]|\\[CHAR\\]|\\[COMPILE\\]|\\[IS\\]|\\[TO\\]|<COMPILATION|<INTERPRETATION|ASSERT\\(|ASSERT0\\(|ASSERT1\\(|ASSERT2\\(|ASSERT3\\(|COMPILATION>|DEFERS|DOES>|INTERPRETATION>|OF|POSTPONE)(?=\\s|$)',
caseInsensitive: true,
caseInsensitive: true},
{ token: 'keyword.other.non-immediate.forth',
regex: '(?:^|\\s)(?:\'|<IS>|<TO>|CHAR|END-STRUCT|INCLUDE[D]?|LOAD|NEEDS|REQUIRE[D]?|REVISION|SEE|STRUCT|THRU|USE)(?=\\s|$)',
caseInsensitive: true,
caseInsensitive: true},
{ token: 'keyword.other.warning.forth',
regex: '(?:^|\\s)(?:~~|BREAK:|BREAK"|DBG)(?=\\s|$)',
caseInsensitive: true,
caseInsensitive: true}],
'#word-def':
[ { token:
[ 'keyword.other.compile-only.forth',

View file

@ -63,7 +63,7 @@ module.exports = {
"test: no auto indent in multi line comment" : function() {
assert.equal("", this.mode.getNextLineIndent("start", "/* -->", " "));
assert.equal(" ", this.mode.getNextLineIndent("start", " /* ->", " "));
assert.equal(" ", this.mode.getNextLineIndent("comment.block0", " abcd", " "));
assert.equal(" ", this.mode.getNextLineIndent("comment.block", " abcd", " "));
},
"test: no auto indent after -> in single line comment" : function() {

View file

@ -272,7 +272,7 @@ var Tokenizer = function(rules) {
if (value) {
if (typeof type == "string") {
if ((!rule || rule.merge) && token.type === type) {
if ((!rule || rule.merge !== false) && token.type === type) {
token.value += value;
} else {
if (token.type)