textpow 0.10.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +7 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +30 -0
- data/{History.txt → History.rdoc} +10 -0
- data/{README.txt → MIT-LICENSE.txt} +0 -30
- data/README.rdoc +82 -0
- data/Rakefile +42 -49
- data/bin/plist2syntax +0 -0
- data/bin/plist2yaml +0 -0
- data/examples/benchmark_js.rb +13 -0
- data/examples/jquery.js +9046 -0
- data/lib/textpow.rb +43 -3
- data/lib/textpow/debug_processor.rb +35 -35
- data/lib/textpow/recording_processor.rb +13 -0
- data/lib/textpow/score_manager.rb +60 -60
- data/lib/textpow/syntax.rb +303 -262
- data/lib/textpow/syntax/broken/markdown.syntax +519 -0
- data/lib/textpow/syntax/broken/php.syntax +1253 -0
- data/lib/textpow/syntax/buggy/nemerle.syntax +74 -0
- data/lib/textpow/syntax/old/YAML.yaml +160 -0
- data/lib/textpow/syntax/old/txt2tags.yaml +139 -0
- data/lib/textpow/syntax/source.actionscript.syntax +97 -0
- data/lib/textpow/syntax/source.active4d.library.syntax +21 -0
- data/lib/textpow/syntax/source.active4d.syntax +276 -0
- data/lib/textpow/syntax/source.ada.syntax +33 -0
- data/lib/textpow/syntax/source.antlr.syntax +151 -0
- data/lib/textpow/syntax/source.apache-config.mod_perl.syntax +50 -0
- data/lib/textpow/syntax/source.apache-config.syntax +191 -0
- data/lib/textpow/syntax/source.applescript.syntax +384 -0
- data/lib/textpow/syntax/source.asp.syntax +70 -0
- data/lib/textpow/syntax/source.asp.vb.net.syntax +129 -0
- data/lib/textpow/syntax/source.c++.qt.syntax +26 -0
- data/lib/textpow/syntax/source.c++.syntax +186 -0
- data/lib/textpow/syntax/source.c-sharp.syntax +59 -0
- data/lib/textpow/syntax/source.c.ragel.syntax +201 -0
- data/lib/textpow/syntax/source.c.syntax +414 -0
- data/lib/textpow/syntax/source.camlp4.ocaml.syntax +36 -0
- data/lib/textpow/syntax/source.cm.syntax +32 -0
- data/lib/textpow/syntax/source.coffee.syntax +216 -0
- data/lib/textpow/syntax/source.context-free.syntax +176 -0
- data/lib/textpow/syntax/source.css.beta.syntax +1925 -0
- data/lib/textpow/syntax/source.css.syntax +195 -0
- data/lib/textpow/syntax/source.d.syntax +142 -0
- data/lib/textpow/syntax/source.diff.syntax +81 -0
- data/lib/textpow/syntax/source.dot.syntax +47 -0
- data/lib/textpow/syntax/source.dylan.syntax +62 -0
- data/lib/textpow/syntax/source.eiffel.syntax +78 -0
- data/lib/textpow/syntax/source.erlang.syntax +922 -0
- data/lib/textpow/syntax/source.fortran.syntax +141 -0
- data/lib/textpow/syntax/source.fscript.syntax +80 -0
- data/lib/textpow/syntax/source.fxscript.syntax +142 -0
- data/lib/textpow/syntax/source.gri.syntax +83 -0
- data/lib/textpow/syntax/source.groovy.groovy.syntax +191 -0
- data/lib/textpow/syntax/source.haskell.syntax +88 -0
- data/lib/textpow/syntax/source.icalendar.syntax +32 -0
- data/lib/textpow/syntax/source.inform.syntax +48 -0
- data/lib/textpow/syntax/source.ini.syntax +55 -0
- data/lib/textpow/syntax/source.io.syntax +81 -0
- data/lib/textpow/syntax/source.java-props.syntax +20 -0
- data/lib/textpow/syntax/source.java.syntax +211 -0
- data/lib/textpow/syntax/source.js.greasemonkey.syntax +34 -0
- data/lib/textpow/syntax/source.js.jquery.syntax +114 -0
- data/lib/textpow/syntax/source.js.mootools.syntax +572 -0
- data/lib/textpow/syntax/source.js.prototype.bracketed.syntax +140 -0
- data/lib/textpow/syntax/source.js.prototype.syntax +72 -0
- data/lib/textpow/syntax/source.js.syntax +256 -0
- data/lib/textpow/syntax/source.js.yui.syntax +176 -0
- data/lib/textpow/syntax/source.json.syntax +136 -0
- data/lib/textpow/syntax/source.lex.syntax +219 -0
- data/lib/textpow/syntax/source.lighttpd-config.syntax +54 -0
- data/lib/textpow/syntax/source.lilypond.syntax +492 -0
- data/lib/textpow/syntax/source.lisp.syntax +61 -0
- data/lib/textpow/syntax/source.logo.syntax +29 -0
- data/lib/textpow/syntax/source.logtalk.syntax +152 -0
- data/lib/textpow/syntax/source.lua.syntax +86 -0
- data/lib/textpow/syntax/source.makefile.syntax +36 -0
- data/lib/textpow/syntax/source.matlab.syntax +142 -0
- data/lib/textpow/syntax/source.mel.syntax +92 -0
- data/lib/textpow/syntax/source.mips.syntax +66 -0
- data/lib/textpow/syntax/source.ml.syntax +121 -0
- data/lib/textpow/syntax/source.modula-3.syntax +47 -0
- data/lib/textpow/syntax/source.nant-build.syntax +53 -0
- data/lib/textpow/syntax/source.objc++.syntax +18 -0
- data/lib/textpow/syntax/source.objc.syntax +233 -0
- data/lib/textpow/syntax/source.ocaml.syntax +764 -0
- data/lib/textpow/syntax/source.ocamllex.syntax +167 -0
- data/lib/textpow/syntax/source.ocamlyacc.syntax +184 -0
- data/lib/textpow/syntax/source.open-gl.syntax +14 -0
- data/lib/textpow/syntax/source.pascal.syntax +77 -0
- data/lib/textpow/syntax/source.pascal.vectorscript.syntax +57 -0
- data/lib/textpow/syntax/source.perl.syntax +1113 -0
- data/lib/textpow/syntax/source.php.cake.syntax +55 -0
- data/lib/textpow/syntax/source.plist.tm-grammar.syntax +708 -0
- data/lib/textpow/syntax/source.postscript.syntax +114 -0
- data/lib/textpow/syntax/source.processing.syntax +106 -0
- data/lib/textpow/syntax/source.prolog.syntax +40 -0
- data/lib/textpow/syntax/source.python.django.syntax +21 -0
- data/lib/textpow/syntax/source.python.syntax +868 -0
- data/lib/textpow/syntax/source.qmake.syntax +114 -0
- data/lib/textpow/syntax/source.quake-config.syntax +32 -0
- data/lib/textpow/syntax/source.r-console.syntax +16 -0
- data/lib/textpow/syntax/source.r.syntax +81 -0
- data/lib/textpow/syntax/source.regexp.oniguruma.syntax +107 -0
- data/lib/textpow/syntax/source.regexp.python.syntax +109 -0
- data/lib/textpow/syntax/source.regexp.syntax +50 -0
- data/lib/textpow/syntax/source.remind.syntax +253 -0
- data/lib/textpow/syntax/source.rez.syntax +80 -0
- data/lib/textpow/syntax/source.ruby.experimental.syntax +145 -0
- data/lib/textpow/syntax/source.ruby.rails.syntax +88 -0
- data/lib/textpow/syntax/source.ruby.syntax +1035 -0
- data/lib/textpow/syntax/source.s5.syntax +69 -0
- data/lib/textpow/syntax/source.sass.syntax +45 -0
- data/lib/textpow/syntax/source.scheme.syntax +347 -0
- data/lib/textpow/syntax/source.scilab.syntax +41 -0
- data/lib/textpow/syntax/source.scss.syntax +527 -0
- data/lib/textpow/syntax/source.shell.syntax +384 -0
- data/lib/textpow/syntax/source.slate.syntax +149 -0
- data/lib/textpow/syntax/source.smarty.syntax +63 -0
- data/lib/textpow/syntax/source.sql.ruby.syntax +18 -0
- data/lib/textpow/syntax/source.sql.syntax +237 -0
- data/lib/textpow/syntax/source.ssh-config.syntax +33 -0
- data/lib/textpow/syntax/source.strings.syntax +39 -0
- data/lib/textpow/syntax/source.swig.syntax +57 -0
- data/lib/textpow/syntax/source.tcl.macports.syntax +163 -0
- data/lib/textpow/syntax/source.tcl.syntax +152 -0
- data/lib/textpow/syntax/source.yaml.syntax +160 -0
- data/lib/textpow/syntax/text.active4d-ini.syntax +50 -0
- data/lib/textpow/syntax/text.bbcode.syntax +287 -0
- data/lib/textpow/syntax/text.bibtex.syntax +151 -0
- data/lib/textpow/syntax/text.blog.html.syntax +41 -0
- data/lib/textpow/syntax/text.blog.markdown.syntax +42 -0
- data/lib/textpow/syntax/text.blog.syntax +27 -0
- data/lib/textpow/syntax/text.blog.textile.syntax +27 -0
- data/lib/textpow/syntax/text.gtdalt.syntax +143 -0
- data/lib/textpow/syntax/text.haml.syntax +88 -0
- data/lib/textpow/syntax/text.html.asp.net.syntax +424 -0
- data/lib/textpow/syntax/text.html.asp.syntax +27 -0
- data/lib/textpow/syntax/text.html.basic.syntax +362 -0
- data/lib/textpow/syntax/text.html.cfm.syntax +119 -0
- data/lib/textpow/syntax/text.html.django.syntax +36 -0
- data/lib/textpow/syntax/text.html.dokuwiki.syntax +204 -0
- data/lib/textpow/syntax/text.html.doxygen.syntax +43 -0
- data/lib/textpow/syntax/text.html.markdown.multimarkdown.syntax +39 -0
- data/lib/textpow/syntax/text.html.mason.syntax +119 -0
- data/lib/textpow/syntax/text.html.mediawiki.syntax +567 -0
- data/lib/textpow/syntax/text.html.mt.syntax +162 -0
- data/lib/textpow/syntax/text.html.ruby.syntax +40 -0
- data/lib/textpow/syntax/text.html.strict.active4d.syntax +311 -0
- data/lib/textpow/syntax/text.html.tcl.syntax +26 -0
- data/lib/textpow/syntax/text.html.textile.syntax +215 -0
- data/lib/textpow/syntax/text.html.tt.syntax +121 -0
- data/lib/textpow/syntax/text.html.twiki.syntax +241 -0
- data/lib/textpow/syntax/text.html.xhtml.1-strict.syntax +4027 -0
- data/lib/textpow/syntax/text.log.latex.syntax +50 -0
- data/lib/textpow/syntax/text.mail.markdown.syntax +118 -0
- data/lib/textpow/syntax/text.man.syntax +17 -0
- data/lib/textpow/syntax/text.moinmoin.syntax +189 -0
- data/lib/textpow/syntax/text.plain.gtd.syntax +22 -0
- data/lib/textpow/syntax/text.plain.release-notes.syntax +46 -0
- data/lib/textpow/syntax/text.plain.syntax +32 -0
- data/lib/textpow/syntax/text.plist.syntax +635 -0
- data/lib/textpow/syntax/text.pmwiki.syntax +113 -0
- data/lib/textpow/syntax/text.restructuredtext.syntax +250 -0
- data/lib/textpow/syntax/text.setext.syntax +147 -0
- data/lib/textpow/syntax/text.subversion-commit.syntax +36 -0
- data/lib/textpow/syntax/text.tabular.csv.syntax +68 -0
- data/lib/textpow/syntax/text.tabular.tsv.syntax +50 -0
- data/lib/textpow/syntax/text.tex.latex.beamer.syntax +41 -0
- data/lib/textpow/syntax/text.tex.latex.haskell.syntax +24 -0
- data/lib/textpow/syntax/text.tex.latex.memoir.syntax +64 -0
- data/lib/textpow/syntax/text.tex.latex.rd.syntax +91 -0
- data/lib/textpow/syntax/text.tex.latex.sweave.syntax +84 -0
- data/lib/textpow/syntax/text.tex.latex.syntax +566 -0
- data/lib/textpow/syntax/text.tex.math.syntax +49 -0
- data/lib/textpow/syntax/text.tex.syntax +86 -0
- data/lib/textpow/syntax/text.txt2tags.syntax +79 -0
- data/lib/textpow/syntax/text.xml.apple-dist.syntax +77 -0
- data/lib/textpow/syntax/text.xml.strict.syntax +92 -0
- data/lib/textpow/syntax/text.xml.syntax +180 -0
- data/lib/textpow/syntax/text.xml.xsl.syntax +60 -0
- data/lib/textpow/version.rb +3 -0
- data/spec/fixtures/objeck.plist +107 -0
- data/spec/fixtures/utf8.txt +1 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/textpow/score_manager_spec.rb +20 -0
- data/spec/textpow/syntax_files_spec.rb +26 -0
- data/spec/textpow/syntax_spec.rb +225 -0
- data/spec/textpow_spec.rb +57 -0
- data/textpow.gemspec +19 -0
- metadata +246 -68
- data/Manifest.txt +0 -13
- data/mm/manual.mm +0 -266
- data/test/test_textpow.rb +0 -25
@@ -0,0 +1,176 @@
|
|
1
|
+
---
|
2
|
+
name: Javascript YUI
|
3
|
+
scopeName: source.js.yui
|
4
|
+
uuid: 62E7EF93-5574-4063-BF18-AD38620236B9
|
5
|
+
foldingStartMarker: (^.*{[^}]*$|^.*\([^\)]*$|^.*/\*(?!.*\*/).*$)
|
6
|
+
patterns:
|
7
|
+
- name: support.class.js.yui
|
8
|
+
match: \b(YAHOO|YAHOO_config)\b
|
9
|
+
- name: support.class.js.yui
|
10
|
+
match: \.(util|lang|env|widget|example)\b
|
11
|
+
- name: support.class.js.yui
|
12
|
+
match: \.(CustomEvent|Subscriber|Event|EventProvider|Dom|Point|Region|Connect|DD|DDProxy|DDTarget|DragDrop|DragDropMgr|DDM|Anim|AnimMgr|Bezier|ColorAnim|Easing|Motion|Scroll|AutoComplete|DataSource|DS_JSArray|DS_JSFunction|DS_XHR|Config|KeyListener|Attribute|AttributeProvider|Element|History)\b
|
13
|
+
- name: support.class.js.yui
|
14
|
+
match: \.(AutoComplete|DataSource|DS_JSArray|DS_JSFunction|DS_XHR|Calendar|Calendar2up|Calendar_Core|CalendarGroup|DateMath|Module|Overlay|OverlayManager|Tooltip|Panel|Dialog|SimpleDialog|ContainerEffect|Logger|LogMsg|LogReader|LogWriter|Menu|MenuItem|Menubar|MenuBarItem|MenuManager|MenuModule|MenuModuleItem|ContextMenu|ContextMenuItem|Slider|SliderThumb|Tab|TabView|TreeView|Node|HTMLNode|MenuNode|TextNode|RootNode|TVAnim|TVFadeIn|TVFadeOut|Column|ColumnEditor|ColumnSet|DataTable|Record|RecordSet|Sort|WidthResizer|Button|ButtonGroup)\b
|
15
|
+
- name: support.function.YAHOO.js.yui
|
16
|
+
match: \.(log|namespace|register)\b(?=\()
|
17
|
+
- name: support.function.lang.js.yui
|
18
|
+
match: \.(augment|extend|hasOwnProperty|isArray|isBoolean|isFunction|isNull|isNumber|isObject|isString|isUndefined)\b(?=\()
|
19
|
+
- name: support.function.Subscriber.js.yui
|
20
|
+
match: \.(getScope)\b(?=\()
|
21
|
+
- name: support.function.CustomEvent.js.yui
|
22
|
+
match: \.(fire|subscribe|unsubscribe|unsubscribeAll)\b(?=\()
|
23
|
+
- name: support.function.Event.js.yui
|
24
|
+
match: \.(addListener|clearCache|fireLegacyEvent|generateId|getCharCode|getEl|getEvent|getLegacyIndex|getListeners|getPageX|getPageY|getRelatedTarget|getTarget|getTime|getXY|on|onAvailable|onContentReady|preventDefault|purgeElement|removeListener|resolveTextNode|startInterval|stopEvent|stopPropagation|useLegacyEvent)\b(?=\()
|
25
|
+
- name: support.function.EventProvider.js.yui
|
26
|
+
match: \.(createEvent|fireEvent|hasEvent|subscribe|unsubscribe)\b(?=\()
|
27
|
+
- name: support.function.Dom.js.yui
|
28
|
+
match: \.(addClass|batch|generateId|get|getClientHeight|getClientWidth|getDocumentHeight|getDocumentWidth|getElementsBy|getElementsByClassName|getRegion|getStyle|getViewportHeight|getViewportWidth|getX|getXY|getY|hasClass|inDocument|isAncestor|removeClass|replaceClass|setStyle|setX|setXY|setY)\b(?=\()
|
29
|
+
- name: support.function.Region.js.yui
|
30
|
+
match: \.(contains|getArea|intersect|union|getRegion)\b(?=\()
|
31
|
+
- name: support.function.Connect.js.yui
|
32
|
+
match: \.(abort|appendPostData|asyncRequest|createExceptionObject|createFrame|createResponseObject|createXhrObject|getConnectionObject|handleReadyState|handleTransactionResponse|initHeader|isCallInProgress|releaseObject|resetFormState|setDefaultPostHeader|setForm|setHeader|setPollingInterval|setProgId|uploadFile)\b(?=\()
|
33
|
+
- name: support.function.Anim.js.yui
|
34
|
+
match: \.(animate|doMethod|getAttribute|getDefaultUnit|getEl|getStartTime|init|isAnimated|onTween|setAttribute|setRuntimeAttribute|stop)\b(?=\()
|
35
|
+
- name: support.function.AnimMgr.js.yui
|
36
|
+
match: \.(correctFrame|registerElement|run|start|stop|unRegister)\b(?=\()
|
37
|
+
- name: support.function.Bezier.js.yui
|
38
|
+
match: \.(getPosition)\b(?=\()
|
39
|
+
- name: support.function.ColorAnim.js.yui
|
40
|
+
match: \.(parseColor)\b(?=\()
|
41
|
+
- name: support.function.Easing.js.yui
|
42
|
+
match: \.(backBoth|backIn|backOut|bounceBoth|bounceIn|bounceOut|easeBoth|easeBothStrong|easeIn|easeInStrong|easeNone|easeOut|easeOutStrong|elasticBoth|elasticIn|elasticOut)\b
|
43
|
+
- name: support.function.Motion.js.yui
|
44
|
+
match: \.()\b(?=\()
|
45
|
+
- name: support.function.Scroll.js.yui
|
46
|
+
match: \.()\b(?=\()
|
47
|
+
- name: support.function.DragDrop.js.yui
|
48
|
+
match: \.(addInvalidHandleClass|addInvalidHandleId|addInvalidHandleType|addToGroup|applyConfig|b4Drag|b4DragDrop|b4DragOut|b4DragOver|b4EndDrag|b4MouseDown|b4StartDrag|clearConstraints|clearTicks|endDrag|getDragEl|getEl|getTick|handleMouseDown|handleOnAvailable|init|initTarget|isLocked|isValidHandleChild|lock|onAvailable|onDrag|onDragDrop|onDragEnter|onDragOut|onDragOver|onInvalidDrop|onMouseDown|onMouseUp|padding|removeFromGroup|removeInvalidHandleClass|removeInvalidHandleId|removeInvalidHandleType|resetContraints|setDragElId|setHandleElId|setInitPosition|setOuterHandleElId|setPadding|setStartPosition|setXConstraint|setXTicks|setYConstraint|setYTicks|startDrag|unlock|unreg)\b(?=\()
|
49
|
+
- name: support.function.DragDropMgr.js.yui
|
50
|
+
match: \.(fireEvents|getBestMatch|getClientHeight|getClientWidth|getCss|getDDById|getElement|getElWrapper|getLocation|getPosX|getPosY|getRelated|getScrollLeft|getScrollTop|getStyle|handleMouseDown|handleMouseMove|handleMouseUp|handleWasClicked|init|isDragDrop|isHandle|isLegalTarget|isLocked|isOverTarget|isTypeOfDD|lock|moveToEl|numericSort|refreshCache|regDragDrop|regHandle|removeDDFromGroup|startDrag|stopDrag|stopEvent|swapNode|unlock|unregAll|verifyEl)\b(?=\()
|
51
|
+
- name: support.function.DD.js.yui
|
52
|
+
match: \.(alignElWithMouse|applyConfig|autoOffset|autoScroll|cachePosition|getTargetCoord|setDelta|setDragElPos)\b(?=\()
|
53
|
+
- name: support.function.DDProxy.js.yui
|
54
|
+
match: \.(createFrame|initFrame|showFrame)\b(?=\()
|
55
|
+
- name: support.function.DDTarget.js.yui
|
56
|
+
match: \.()\b(?=\()
|
57
|
+
- name: support.function.History.js.yui
|
58
|
+
match: \.(getBookmarkedState|getCurrentState|initialize|navigate|register)\b(?=\()
|
59
|
+
- name: support.function.DataSource.js.yui
|
60
|
+
match: \.(addToCache|flushCache|getCachedResponse|handleResponse|isCacheHit|makeConnection|parseArrayData|parseJSONData|parseTextData|parseXMLData|sendRequest)\b(?=\()
|
61
|
+
- name: support.function.AutoComplete.js.yui
|
62
|
+
match: \.(doBeforeExpandContainer|formatResult|getListItemData|getListItems|isContainerOpen|sendQuery|setBody|setFooter|setHeader)\b(?=\()
|
63
|
+
- name: support.function.DS_JSArray.js.yui
|
64
|
+
match: \.()\b(?=\()
|
65
|
+
- name: support.function.DS_JSFunction.js.yui
|
66
|
+
match: \.()\b(?=\()
|
67
|
+
- name: support.function.DS_XHR.js.yui
|
68
|
+
match: \.(parseResponse)\b(?=\()
|
69
|
+
- name: support.function.Calendar.js.yui
|
70
|
+
match: \.(addMonthRenderer|addMonths|addRenderer|addWeekdayRenderer|addYears|applyListeners|buildDayLabel|buildMonthLabel|buildWeekdays|clear|clearAllBodyCellStyles|clearElement|configClose|configIframe|configLocale|configLocaleValues|configMaxDate|configMinDate|configOptions|configPageDate|configSelected|configTitle|deselect|deselectAll|deselectCell|doCellMouseOut|doCellMouseOver|doSelectCell|getDateByCellId|getDateFieldsByCellId|getSelectedDates|hide|init|initEvents|initStyles|isDateOOM|nextMonth|nextYear|onBeforeDeselect|onBeforeSelect|onChangePage|onClear|onDeselect|onRender|onReset|onSelect|previousMonth|previousYear|refreshLocale|render|renderBody|renderBodyCellRestricted|renderCellDefault|renderCellNotThisMonth|renderCellStyleHighlight1|renderCellStyleHighlight2|renderCellStyleHighlight3|renderCellStyleHighlight4|renderCellStyleSelected|renderCellStyleToday|renderFooter|renderHeader|renderOutOfBoundsDate|renderRowFooter|renderRowHeader|reset|resetRenderers|select|selectCell|setMonth|setYear|show|styleCellDefault|subtractMonths|substractYears|validate)\b(?=\()
|
71
|
+
- name: support.function.CalendarGroup.js.yui
|
72
|
+
match: \.(addMonthRenderer|addMonths|addRenderer|addWeekdayRenderer|addYears|callChildFunction|clear|configPageDate|configPages|constructChild|delegateConfig|deselect|deselectAll|deselectCell|getSelectedDates|init|initEvents|nextMonth|nextYear|previousMonth|previousYear|render|renderFooter|renderHeader|reset|select|selectCell|setChildFunction|setMonth|setYear|sub|subtractMonths|subtractYears|unsub)\b(?=\()
|
73
|
+
- name: support.function.DateMath.js.yui
|
74
|
+
match: \.(add|after|before|between|clearTime|findMonthEnd|findMonthStart|getDayOffset|getJan1|getWeekNumber|isMonthOverlapWeek|isYearOverlapWeek|subtract)\b(?=\()
|
75
|
+
- name: support.function.Config.js.yui
|
76
|
+
match: \.(addProperty|alreadySubscribed|applyConfig|checkBoolean|checkNumber|fireEvent|fireQueue|getConfig|getProperty|init|outputEventQueue|queueProperty|refireEvent|refresh|resetProperty|setProperty|subscribeToConfigEvent|unsubscribeFromConfigEvent)\b(?=\()
|
77
|
+
- name: support.function.KeyListener.js.yui
|
78
|
+
match: \.(disable|enable|handleKeyPress)\b(?=\()
|
79
|
+
- name: support.function.Module.js.yui
|
80
|
+
match: \.(appendToBody|appendToFooter|appendToHeader|configMonitorResize|configVisible|destroy|hide|init|initDefaultConfig|initEvents|initResizeMonitor|onDomResize|render|setBody|setFooter|setHeader|show)\b(?=\()
|
81
|
+
- name: support.function.Overlay.js.yui
|
82
|
+
match: \.(align|center|configConstrainToViewport|configContext|configFixedCenter|configHeight|configIframe|configVisible|configWidth|configX|configXY|configY|configZIndex|destroy|doCenterOnDOMEvent|enforceContraints|hideIframe|hideMacGeckoScrollbars|init|initDefaultConfig|initEvenrts|moveTo|onDomResize|showIframe|showMacGeckoScrollbars|syncPosition|windowResizeHandle|windowScrollHandler)\b(?=\()
|
83
|
+
- name: support.function.OverlayManager.js.yui
|
84
|
+
match: \.(blurAll|compareZIndexDesc|find|focus|getActive|hideAll|init|initDefaultConfig|register|remove|showAll)\b(?=\()
|
85
|
+
- name: support.function.Tooltip.js.yui
|
86
|
+
match: \.(configContainer|configContext|configText|doHide|doShow|init|initDefaultConfig|onContextMouseMove|onContextMouseOut|onContextMouseOver|preventOverlay)\b(?=\()
|
87
|
+
- name: support.function.Panel.js.yui
|
88
|
+
match: \.(buildMask|buildWrapper|configClose|configDraggable|configHeight|configKeyListeners|configModal|configUnderlay|configWidth|configzIndex|hideMask|init|initDefaultConfig|initEvents|onDomResize|registerDragDrop|removeMask|render|showMask|sizeMask|sizeUnderlay)\b(?=\()
|
89
|
+
- name: support.function.Dialog.js.yui
|
90
|
+
match: \.(blurButtons|cancel|configButtons|doSubmit|focusDefaultButton|focusFirst|focusFirstButton|focusLast|focusLastButton|getData|init|initDefaultConfig|initEvents|registerForm|submit|validate)\b(?=\()
|
91
|
+
- name: support.function.SimpleDialog.js.yui
|
92
|
+
match: \.(configIcon|configText|init|initDefaultConfig|registerForm)\b(?=\()
|
93
|
+
- name: support.function.ContainerEffect.js.yui
|
94
|
+
match: \.(animateIn|animateOut|FADE|handleCompleteAnimateIn|handleCompleteAnimateOut|handleStartAnimateIn|handleStartAnimateOut|handleTweenAnimateIn|handleTweenAnimateOut|init|SLIDE)\b(?=\()
|
95
|
+
- name: support.function.Logger.js.yui
|
96
|
+
match: \.(disableBrowserConsole|enableBrowserConsole|getStack|getStartTime|log|reset)\b(?=\()
|
97
|
+
- name: support.function.LogMsg.js.yui
|
98
|
+
match: \.()\b(?=\()
|
99
|
+
- name: support.function.LogReader.js.yui
|
100
|
+
match: \.(formatMsg|getLastTime|hide|html2Text|pause|resume|setTitle|show)\b(?=\()
|
101
|
+
- name: support.function.LogWriter.js.yui
|
102
|
+
match: \.(getSource|log|setSource)\b(?=\()
|
103
|
+
- name: support.function.Menu.js.yui
|
104
|
+
match: \.(addItem|addItems|clearActiveItem|configContainer|configHideDelay|configIframe|configPosition|configVisible|destroy|disableAutoSubmenuDisplay|enforceConstraints|getItem|getItemGroups|getRoot|init|initDefaultConfig|initEvents|insertItem|onDomResize|removeItem|setInitialFocus|setInitialSelection|setItemGroupTitle)\b(?=\()
|
105
|
+
- name: support.function.MenuItem.js.yui
|
106
|
+
match: \.(blur|configChecked|configDisabled|configEmphasis|configHelpText|configSelected|configStrongEmphasis|configSubmenu|configTarget|configText|configUrl|destroy|focus|getFirstItemIndex|getNextArrayItem|getNextEnabledSibling|getPreviousArrayItem|getPreviousEnabledSibling|init|initDefaultConfig|initHelpText|removeHelpText)\b(?=\()
|
107
|
+
- name: support.function.Menubar.js.yui
|
108
|
+
match: \.(init|initDefaultConfig)\b(?=\()
|
109
|
+
- name: support.function.MenuBarItem.js.yui
|
110
|
+
match: \.(init)\b(?=\()
|
111
|
+
- name: support.function.MenuManager.js.yui
|
112
|
+
match: \.(addItem|addMenu|getMenu|getMenuRootElement|getMenus|hideVisible|onDOMEvent|onItemAdded|onItemDestroy|onItemRemoved|onMenuDestroy|onMenuVisibleConfigChange|removeItem|removeMenu)\b(?=\()
|
113
|
+
- name: support.function.MenuModule.js.yui
|
114
|
+
match: \.()\b(?=\()
|
115
|
+
- name: support.function.MenuModuleItem.js.yui
|
116
|
+
match: \.()\b(?=\()
|
117
|
+
- name: support.function.ContextMenu.js.yui
|
118
|
+
match: \.(configTrigger|destroy|init|initDefaultConfig)\b(?=\()
|
119
|
+
- name: support.function.ContextMenuItem.js.yui
|
120
|
+
match: \.(init)\b(?=\()
|
121
|
+
- name: support.function.Slider.js.yui
|
122
|
+
match: \.(b4MouseDown|endMove|fireEvents|focus|getThumb|getValue|getXValue|getYValue|handleThumbChange|lock|moveOneTick|moveThumb|onChange|onDrag|onMouseDown|onSliderEnd|onSlideStart|setRegionValue|setSliderStartState|setThumbCenterPoint|setValue|thumbMouseUp|unlock|verifyOffset|getHorizSlider|getSliderRegion|getVertSlider)\b(?=\()
|
123
|
+
- name: support.function.SliderThumb.js.yui
|
124
|
+
match: \.(clearTicks|getOffsetFromParent|getValue|getXValue|getYValue|initSlider|onChange)\b(?=\()
|
125
|
+
- name: support.function.AttributeProvider.js.yui
|
126
|
+
match: \.(configureAttribute|fireBeforeChangeEvent|fireChangeEvent|get|getAttributeConfig|getAttributeKeys|refresh|register|resetAttributeConfig|resetValue|set|setAttributes)\b(?=\()
|
127
|
+
- name: support.function.Attribute.js.yui
|
128
|
+
match: \.(configure|getValue|refresh|resetConfig|resetValue|setValue|getValue|refresh|resetConfig|resetValue|setValue)\b(?=\()
|
129
|
+
- name: support.function.Element.js.yui
|
130
|
+
match: \.(addClass|addListener|appendChild|appendTo|fireQueue|getElementsByClassName|getElementsByTagName|getStyle|hasChildNodes|hasClass|initAttributes|insertBefore|on|removeChild|removeClass|removeListener|replaceChild|replaceClass|setStyle)\b(?=\()
|
131
|
+
- name: support.function.TabView.js.yui
|
132
|
+
match: \.(addTab|contentTransition|createTabs|DOMEventHandler|getTab|getTabIndex|initAttributes|removeTab)\b(?=\()
|
133
|
+
- name: support.function.Tab.js.yui
|
134
|
+
match: \.(initAttributes)\b(?=\()
|
135
|
+
- name: support.function.TreeView.js.yui
|
136
|
+
match: \.(animateCollapse|animateExpand|collapseAll|collapseComplete|draw|expandAll|expandComplete|generateId|getEl|getNodeByIndex|getNodeByProperty|getNodesByProperty|getRoot|init|onCollapse|onExpand|popNode|regNode|removeChildren|removeNode|setCollapseAnim|setDynamicLoad|setExpandAnim|setUpLabel|addHandler|getNode|getTree|preload|removeHandler)\b(?=\()
|
137
|
+
- name: support.function.Node.js.yui
|
138
|
+
match: \.(appendChild|appendTo|applyParent|collapseToggleStyle|collapseAll|completeRender|expand|expandAll|getAncestor|getChildrenEl|getChildrenElId|getChildrenHtml|getDepthStyle|getEl|getElId|getHoverStyle|getHtml|getIconMode|getNodeHtml|getSiblings|getStyle|getToggleEl|getToggleElId|getToggleLink|hasChildren|hideChildren|init|insertAfter|insertBefore|isChildOf|isDynamic|isRoot|loadComplete|refresh|renderChildren|setDynamicLoad|showChildren|toggle)\b(?=\()
|
139
|
+
- name: support.function.HTMLNode.js.yui
|
140
|
+
match: \.(getContentEl)\b(?=\()
|
141
|
+
- name: support.function.MenuNode.js.yui
|
142
|
+
match: \.()\b(?=\()
|
143
|
+
- name: support.function.TextNode.js.yui
|
144
|
+
match: \.(getLabelEl|onLabelClick)\b(?=\()
|
145
|
+
- name: support.function.RootNode.js.yui
|
146
|
+
match: \.()\b(?=\()
|
147
|
+
- name: support.function.TVAnim.js.yui
|
148
|
+
match: \.(getAnim|isValid)\b(?=\()
|
149
|
+
- name: support.function.TVFadeIn.js.yui
|
150
|
+
match: \.(animate|onComplete)\b(?=\()
|
151
|
+
- name: support.function.TVFadeOut.js.yui
|
152
|
+
match: \.(animate|onComplete)\b(?=\()
|
153
|
+
- name: support.function.Column.js.yui
|
154
|
+
match: \.(format|formatCheckbox|formatCurrency|formatDate|formatEmail|formatLink|formatNumber|formatSelect|getColSpan|getId|getRowSpan|parse|parseCheckbox|parseCurrency|parseDate|parseNumber|parseSelect|showEditor)\b(?=\()
|
155
|
+
- name: support.function.ColumnEditor.js.yui
|
156
|
+
match: \.(createTextareaEditor|createTextboxEditor|getTextareaEditorValue|getTextboxEditorValue|getValue|hide|show|showTextareaEditor|showTextboxEditor)\b(?=\()
|
157
|
+
- name: support.function.ColumnSet.js.yui
|
158
|
+
match: \.()\b(?=\()
|
159
|
+
- name: support.function.DataTable.js.yui
|
160
|
+
match: \.(addRow|appendRow|deleteRow|deleteSelectedRows|doBeforeLoadData|editCell|focusTable|formatCell|getBody|getCell|getColumnSet|getHead|getRecordSet|getRow|getSelectedCells|getSelectedRecordIds|getSelectedRows|getTable|hideTableMessages|highlight|insertRows|isSelected|onDataReturnAppendRows|onDataReturnInsertRows|onDataReturnPaginateRows|onDataReturnReplaceRows|onEventEditCell|onEventFormatCell|onEventHighlightCell|onEventSelectCell|onEventSelectRow|onEventSortColumn|onEventUnhighlightCell|paginateRows|replaceRows|select|showEmptyMessage|showLoadingMessage|showPage|sortColumn|unhighlight|unselect|unselectedAllCells|unselectAllRows|updateRow)\b(?=\()
|
161
|
+
- name: support.function.Record.js.yui
|
162
|
+
match: \.()\b(?=\()
|
163
|
+
- name: support.function.RecordSet.js.yui
|
164
|
+
match: \.(addRecord|addRecords|append|deleteRecord|getLength|getRecord|getRecordBy|getRecordIndex|getRecords|insert|replace|reset|sort|updateRecord)\b(?=\()
|
165
|
+
- name: support.function.Sort.js.yui
|
166
|
+
match: \.(compareAsc|compareDesc)\b(?=\()
|
167
|
+
- name: support.function.WidthResizer.js.yui
|
168
|
+
match: \.(onDrag|onMouseDown|onMouseUp)\b(?=\()
|
169
|
+
- name: support.function.Button.js.yui
|
170
|
+
match: \.(addHiddenFieldsToForm|blur|createHiddenField|createInputElement|destroy|focus|getFirstElement|getForm|getMenu|hasFocus|init|initAttributes|initConfig|isActive|setAttributeFromDOMAttribute|setAttributesFromSrcElement|setFormElementProperties)\b(?=\()
|
171
|
+
- name: support.function.ButtonGroup.js.yui
|
172
|
+
match: \.(addButton|addButtons|check|destroy|focus|getButton|getButtons|getCount|init|initAttributes|removeButton)\b(?=\()
|
173
|
+
- include: source.js
|
174
|
+
foldingStopMarker: (^\s*\}|^\s*\)|^(?!.*/\*).*\*/)
|
175
|
+
keyEquivalent: ^~J
|
176
|
+
comment: Yahoo User Interface Library
|
@@ -0,0 +1,136 @@
|
|
1
|
+
---
|
2
|
+
name: JSON
|
3
|
+
fileTypes:
|
4
|
+
- json
|
5
|
+
scopeName: source.json
|
6
|
+
repository:
|
7
|
+
number:
|
8
|
+
name: constant.numeric.json
|
9
|
+
match: |-
|
10
|
+
(?x: # turn on extended mode
|
11
|
+
-? # an optional minus
|
12
|
+
(?:
|
13
|
+
0 # a zero
|
14
|
+
| # ...or...
|
15
|
+
[1-9] # a 1-9 character
|
16
|
+
\d* # followed by zero or more digits
|
17
|
+
)
|
18
|
+
(?:
|
19
|
+
\. # a period
|
20
|
+
\d+ # followed by one or more digits
|
21
|
+
(?:
|
22
|
+
[eE] # an e character
|
23
|
+
[+-]? # followed by an option +/-
|
24
|
+
\d+ # followed by one or more digits
|
25
|
+
)? # make exponent optional
|
26
|
+
)? # make decimal portion optional
|
27
|
+
)
|
28
|
+
comment: handles integer and decimal numbers
|
29
|
+
constant:
|
30
|
+
name: constant.language.json
|
31
|
+
match: \b(?:true|false|null)\b
|
32
|
+
value:
|
33
|
+
patterns:
|
34
|
+
- include: "#constant"
|
35
|
+
- include: "#number"
|
36
|
+
- include: "#string"
|
37
|
+
- include: "#array"
|
38
|
+
- include: "#object"
|
39
|
+
comment: the 'value' diagram at http://json.org
|
40
|
+
array:
|
41
|
+
name: meta.structure.array.json
|
42
|
+
endCaptures:
|
43
|
+
"0":
|
44
|
+
name: punctuation.definition.array.end.json
|
45
|
+
begin: \[
|
46
|
+
beginCaptures:
|
47
|
+
"0":
|
48
|
+
name: punctuation.definition.array.begin.json
|
49
|
+
end: \]
|
50
|
+
patterns:
|
51
|
+
- include: "#value"
|
52
|
+
- name: punctuation.separator.array.json
|
53
|
+
match: ","
|
54
|
+
- name: invalid.illegal.expected-array-separator.json
|
55
|
+
match: "[^\\s\\]]"
|
56
|
+
object:
|
57
|
+
name: meta.structure.dictionary.json
|
58
|
+
endCaptures:
|
59
|
+
"0":
|
60
|
+
name: punctuation.definition.dictionary.end.json
|
61
|
+
begin: \{
|
62
|
+
beginCaptures:
|
63
|
+
"0":
|
64
|
+
name: punctuation.definition.dictionary.begin.json
|
65
|
+
end: \}
|
66
|
+
patterns:
|
67
|
+
- include: "#string"
|
68
|
+
comment: the JSON object key
|
69
|
+
- name: meta.structure.dictionary.value.json
|
70
|
+
endCaptures:
|
71
|
+
"1":
|
72
|
+
name: punctuation.separator.dictionary.pair.json
|
73
|
+
begin: ":"
|
74
|
+
beginCaptures:
|
75
|
+
"0":
|
76
|
+
name: punctuation.separator.dictionary.key-value.json
|
77
|
+
end: (,)|(?=\})
|
78
|
+
patterns:
|
79
|
+
- include: "#value"
|
80
|
+
comment: the JSON object value
|
81
|
+
- name: invalid.illegal.expected-dictionary-separator.json
|
82
|
+
match: "[^\\s,]"
|
83
|
+
- name: invalid.illegal.expected-dictionary-separator.json
|
84
|
+
match: "[^\\s\\}]"
|
85
|
+
comment: a JSON object
|
86
|
+
string:
|
87
|
+
name: string.quoted.double.json
|
88
|
+
endCaptures:
|
89
|
+
"0":
|
90
|
+
name: punctuation.definition.string.end.json
|
91
|
+
begin: "\""
|
92
|
+
beginCaptures:
|
93
|
+
"0":
|
94
|
+
name: punctuation.definition.string.begin.json
|
95
|
+
end: "\""
|
96
|
+
patterns:
|
97
|
+
- name: constant.character.escape.json
|
98
|
+
match: |-
|
99
|
+
(?x: # turn on extended mode
|
100
|
+
\\ # a literal backslash
|
101
|
+
(?: # ...followed by...
|
102
|
+
["\\/bfnrt] # one of these characters
|
103
|
+
| # ...or...
|
104
|
+
u # a u
|
105
|
+
[0-9a-fA-F]{4} # and four hex digits
|
106
|
+
)
|
107
|
+
)
|
108
|
+
- name: invalid.illegal.unrecognized-string-escape.json
|
109
|
+
match: \\.
|
110
|
+
uuid: 0C3868E4-F96B-4E55-B204-1DCB5A20748B
|
111
|
+
foldingStartMarker: |-
|
112
|
+
(?x: # turn on extended mode
|
113
|
+
^ # a line beginning with
|
114
|
+
\s* # some optional space
|
115
|
+
[{\[] # the start of an object or array
|
116
|
+
(?! # but not followed by
|
117
|
+
.* # whatever
|
118
|
+
[}\]] # and the close of an object or array
|
119
|
+
,? # an optional comma
|
120
|
+
\s* # some optional space
|
121
|
+
$ # at the end of the line
|
122
|
+
)
|
123
|
+
| # ...or...
|
124
|
+
[{\[] # the start of an object or array
|
125
|
+
\s* # some optional space
|
126
|
+
$ # at the end of the line
|
127
|
+
)
|
128
|
+
patterns:
|
129
|
+
- include: "#value"
|
130
|
+
foldingStopMarker: |-
|
131
|
+
(?x: # turn on extended mode
|
132
|
+
^ # a line beginning with
|
133
|
+
\s* # some optional space
|
134
|
+
[}\]] # and the close of an object or array
|
135
|
+
)
|
136
|
+
keyEquivalent: ^~J
|
@@ -0,0 +1,219 @@
|
|
1
|
+
---
|
2
|
+
name: Lex/Flex
|
3
|
+
fileTypes:
|
4
|
+
- l
|
5
|
+
scopeName: source.lex
|
6
|
+
repository:
|
7
|
+
csource:
|
8
|
+
patterns:
|
9
|
+
- name: support.function.c.lex
|
10
|
+
match: \b(?:ECHO|BEGIN|REJECT|YY_FLUSH_BUFFER|YY_BREAK|yy(?:more|less|unput|input|terminate|text|leng|restart|_(?:push|pop|top)_state|_(?:create|switch_to|flush|delete)_buffer|_scan_(?:string|bytes|buffer)|_set_(?:bol|interactive))(?=\(|$))\b
|
11
|
+
- include: source.c
|
12
|
+
subregexp:
|
13
|
+
patterns:
|
14
|
+
- include: "#re_escape"
|
15
|
+
- name: constant.other.character-class.set.lex
|
16
|
+
endCaptures:
|
17
|
+
"1":
|
18
|
+
name: punctuation.terminator.character-class.set.lex
|
19
|
+
begin: (\[)(\^)?-?
|
20
|
+
beginCaptures:
|
21
|
+
"1":
|
22
|
+
name: punctuation.definition.character-class.set.lex
|
23
|
+
"2":
|
24
|
+
name: keyword.operator.negation.regexp.lex
|
25
|
+
end: -?(\])
|
26
|
+
patterns:
|
27
|
+
- include: "#re_escape"
|
28
|
+
- name: constant.other.character-class.set.lex
|
29
|
+
captures:
|
30
|
+
"1":
|
31
|
+
name: invalid.illegal.regexp.lex
|
32
|
+
match: \[:(?:(?:alnum|alpha|blank|cntrl|x?digit|graph|lower|print|punct|space|upper)|(.*?)):\]
|
33
|
+
- name: variable.other.lex
|
34
|
+
match: (?i){[a-z_][a-z0-9_-]*}
|
35
|
+
- name: keyword.operator.quantifier.regexp.lex
|
36
|
+
begin: \{
|
37
|
+
end: \}
|
38
|
+
patterns:
|
39
|
+
- match: (?<=\{)[0-9]*(?:,[0-9]*)?(?=\})
|
40
|
+
- name: invalid.illegal.regexp.lex
|
41
|
+
match: "[^}]"
|
42
|
+
comment: "{3} counts should only have digit[,digit]"
|
43
|
+
- name: string.quoted.double.regexp.lex
|
44
|
+
begin: "\""
|
45
|
+
end: "\""
|
46
|
+
patterns:
|
47
|
+
- include: "#re_escape"
|
48
|
+
- begin: ([*+?])(?=[*+?])
|
49
|
+
beginCaptures:
|
50
|
+
"1":
|
51
|
+
name: keyword.operator.quantifier.regexp.lex
|
52
|
+
end: (?=[^*+?])
|
53
|
+
patterns:
|
54
|
+
- name: invalid.illegal.regexp.lex
|
55
|
+
match: .
|
56
|
+
comment: make ** or +? or other combinations illegal
|
57
|
+
- name: keyword.operator.quantifier.regexp.lex
|
58
|
+
match: "[*+?]"
|
59
|
+
- name: invalid.illegal.regexp.lex
|
60
|
+
match: <<EOF>>
|
61
|
+
comment: <<EOF>> is handled in the rule pattern
|
62
|
+
- name: meta.group.regexp.lex
|
63
|
+
endCaptures:
|
64
|
+
"1":
|
65
|
+
name: punctuation.terminator.group.regexp.lex
|
66
|
+
begin: (\()
|
67
|
+
beginCaptures:
|
68
|
+
"1":
|
69
|
+
name: punctuation.definition.group.regexp.lex
|
70
|
+
end: (\))|(?=\s)|$(?#end on whitespace because regex does)
|
71
|
+
patterns:
|
72
|
+
- name: invalid.illegal.regexp.lex
|
73
|
+
match: /
|
74
|
+
- include: "#subregexp"
|
75
|
+
- begin: (/)
|
76
|
+
beginCaptures:
|
77
|
+
"1":
|
78
|
+
name: keyword.operator.trailing-match.regexp.lex
|
79
|
+
end: (?=\s)|$
|
80
|
+
patterns:
|
81
|
+
- name: invalid.illegal.regexp.lex
|
82
|
+
match: /|\$(?!\S)
|
83
|
+
- include: "#subregexp"
|
84
|
+
comment: detection of multiple trailing contexts
|
85
|
+
regexp:
|
86
|
+
name: string.regexp.lex
|
87
|
+
captures:
|
88
|
+
"1":
|
89
|
+
name: keyword.control.anchor.regexp.lex
|
90
|
+
begin: \G(?=\S)(\^)?
|
91
|
+
end: (\$)?(?:(?=\s)|$)
|
92
|
+
patterns:
|
93
|
+
- include: "#subregexp"
|
94
|
+
re_escape:
|
95
|
+
name: constant.character.escape.lex
|
96
|
+
match: \\(?i:[0-9]{1,3}|x[0-9a-f]{1,2}|.)
|
97
|
+
includes:
|
98
|
+
patterns:
|
99
|
+
- name: meta.embedded.source.c.lex
|
100
|
+
begin: ^%\{$
|
101
|
+
end: ^%\}$
|
102
|
+
patterns:
|
103
|
+
- include: source.c
|
104
|
+
comment: "TODO: $} should override the embedded scopes"
|
105
|
+
- name: meta.embedded.source.c.lex
|
106
|
+
begin: ^[ \t]+
|
107
|
+
end: $
|
108
|
+
patterns:
|
109
|
+
- include: source.c
|
110
|
+
comment: "TODO: eol should override the embedded scopes"
|
111
|
+
rec_csource:
|
112
|
+
begin: \{
|
113
|
+
end: \}
|
114
|
+
patterns:
|
115
|
+
- include: source.c
|
116
|
+
- include: "#csource"
|
117
|
+
uuid: 92E842A0-9DE6-4D31-A6AC-1CDE0F9547C5
|
118
|
+
foldingStartMarker: /\*\*|\{\s*$
|
119
|
+
patterns:
|
120
|
+
- name: meta.section.definitions.lex
|
121
|
+
begin: \A(?!%%$)
|
122
|
+
end: ^(?=%%$)
|
123
|
+
patterns:
|
124
|
+
- include: "#includes"
|
125
|
+
- name: comment.block.c.lex
|
126
|
+
begin: /\*
|
127
|
+
end: \*/|$
|
128
|
+
- name: meta.definition.lex
|
129
|
+
begin: ^(?i)([a-z_][a-z0-9_-]*)(?=\s|$)
|
130
|
+
beginCaptures:
|
131
|
+
"1":
|
132
|
+
name: entity.name.function.lex
|
133
|
+
end: $
|
134
|
+
patterns:
|
135
|
+
- include: "#regexp"
|
136
|
+
- name: meta.start-condition.lex
|
137
|
+
begin: ^(%[sx])(?=\s|$)
|
138
|
+
beginCaptures:
|
139
|
+
"1":
|
140
|
+
name: punctuation.definition.start-condition.lex
|
141
|
+
end: $
|
142
|
+
patterns:
|
143
|
+
- match: (?i)[a-z_][a-z0-9_-]*
|
144
|
+
- name: invalid.illegal.lex
|
145
|
+
match: \S
|
146
|
+
- name: meta.options.lex
|
147
|
+
begin: ^(%option)\s(?=\S)
|
148
|
+
beginCaptures:
|
149
|
+
"1":
|
150
|
+
name: keyword.other.option.lex
|
151
|
+
end: $
|
152
|
+
patterns:
|
153
|
+
- name: support.other.option.lex
|
154
|
+
match: \b(?:(?:no)?(?:[78]bit|align|backup|batch|c\+\+|debug|default|ecs|fast|full|interactive|lex-compat|meta-ecs|perf-report|read|stdout|verbose|warn|array|pointer|input|unput|yy_(?:(?:push|pop|top)_state|scan_(?:buffer|bytes|string))|main|stack|stdinit|yylineno|yywrap)|(?:case(?:ful|less)|case-(?:in)?sensitive|(?:always|never)-interactive))\b
|
155
|
+
- name: keyword.other.option.lex
|
156
|
+
begin: ^%(?:array|pointer)
|
157
|
+
end: $
|
158
|
+
patterns:
|
159
|
+
- name: invalid.illegal.lex
|
160
|
+
match: \S
|
161
|
+
comment: first section of the file - definitions
|
162
|
+
- begin: ^(%%)$
|
163
|
+
beginCaptures:
|
164
|
+
"1":
|
165
|
+
name: punctuation.separator.sections.lex
|
166
|
+
end: \Z.\A(?# never end)
|
167
|
+
patterns:
|
168
|
+
- name: meta.section.rules.lex
|
169
|
+
begin: ^(?!%%$)
|
170
|
+
end: ^(?=%%$)
|
171
|
+
patterns:
|
172
|
+
- name: meta.rule.lex
|
173
|
+
begin: ^(?!$)
|
174
|
+
end: $
|
175
|
+
patterns:
|
176
|
+
- include: "#includes"
|
177
|
+
- begin: (?i)^(<(?:(?:[a-z_][a-z0-9_-]*,)*[a-z_][a-z0-9_-]|\*)>)?(?:(<<EOF>>)(\s*))?(?=\S)
|
178
|
+
beginCaptures:
|
179
|
+
"1":
|
180
|
+
name: keyword.other.start-condition.lex
|
181
|
+
"2":
|
182
|
+
name: keyword.operator.eof.lex
|
183
|
+
"3":
|
184
|
+
name: invalid.illegal.regexp.lex
|
185
|
+
end: (?=\s)|$
|
186
|
+
patterns:
|
187
|
+
- include: "#regexp"
|
188
|
+
comment: rule pattern
|
189
|
+
- endCaptures:
|
190
|
+
"1":
|
191
|
+
name: punctuation.terminator.code.lex
|
192
|
+
"2":
|
193
|
+
name: invalid.illegal.ignored.lex
|
194
|
+
begin: (%\{)
|
195
|
+
beginCaptures:
|
196
|
+
"1":
|
197
|
+
name: punctuation.definition.code.lex
|
198
|
+
end: (%\})(.*)
|
199
|
+
patterns:
|
200
|
+
- include: "#csource"
|
201
|
+
comment: "TODO: %} should override embedded scopes"
|
202
|
+
- name: meta.rule.action.lex
|
203
|
+
begin: (?=\S)
|
204
|
+
end: $
|
205
|
+
patterns:
|
206
|
+
- include: "#csource"
|
207
|
+
comment: "TODO: eol should override embedded scopes"
|
208
|
+
comment: second section of the file - rules
|
209
|
+
- begin: ^(%%)$
|
210
|
+
contentName: meta.section.user-code.lex
|
211
|
+
beginCaptures:
|
212
|
+
"1":
|
213
|
+
name: punctuation.separator.sections.lex
|
214
|
+
end: \Z.\A(?# never end)
|
215
|
+
patterns:
|
216
|
+
- include: "#csource"
|
217
|
+
comment: third section of the file - user code
|
218
|
+
foldingStopMarker: \*\*/|^\s*\}
|
219
|
+
keyEquivalent: ^~L
|