%YAML 1.2 —
name: OEF WIMS file_extensions:
- oef
- oef.dtml
scope: source.oef
variables: ident: ‘[A-Za-z_][A-Za-z_0-9]*’ ident_wims: ‘[a-zA-Z0-9_]+’
contexts: main:
- match: ” set: html_basic
html_basic:
- match: ”
push: ‘scope:text.html.basic’
with_prototype:
- include: wims_oef
## Commentaires
- match: ^\s*(#.*) name: comments scope: comment.line.number-sign comment: Commentaires commencant par #…
- match: ^\s*(:%%.*) scope: comment.line.wims comment: Commentaires commencant par :%%…
- match: \b(==|!=|!=| < |<=| > |>=|isin|notin|iswordof|notwordof|isvarof|notvarof|isvariableof|notvariableof|isitemof|notitemof|islineof|notlineof|issamecase|notsamecase|issametext|notsametext|or|and)\b
scope: keyword.operator.compare.wims #comment: comparisons operators…
scope: constant.language #comment: langage reserved words
- match: \b(append|nonempty|getopt|replace|embraced|randitem|text|select|upper|nospace|sort|makelist|for|values|rows2lines|lines2items|items2words|tolower)\b
scope: constant.language.wims #comment: wims functions callable in a wims() instruction
scope: constant.language.pari #comment: functions callable in a pari() instruction
scope: storage.type #comment: déclarations de variables
- match: \b(items|item|words|word|lines|line|rows|row|columns|column|position|asis|htmlmath|texmath)\b
scope: constant.language.types #comment: types d’éléments reconnus
- match: \b(evalue|solve|simplify|diff|int|int=|det|abs|sqrt|binomial|ceil|floor|rint|e|erf|erfc|Euler|exp|factorial|Inf|gcd|lcm|%|max|min|lg|lgamma|ln|log2|pow|sgn|PI|sin|acos|sh|Argch)(?=\()
scope: entity.name.function.wims.maths #comment: Maths functions
- Les fonctions trigo sont incomplètes “tg” “tan” “sec” “cot” “cotan” “ctg” “csc”
- Fonctions trigonométriques réciproques (autres fonctions : acos arccos acos arcsin asin
arctan atan arctg atan)
- Fonctions hyperboliques (autres fonctions : sh sinh tanh tanh th ch cosh coth cotanh)
scope: entity.name.function.wims.random #comment: Wims random functions
scope: entity.name.function.wims.external #comment: Wims external functions
- match: \b(reply|choice|step|sc_reply|reply_|help_subject|oef_firstname|oef_lastname|oef_login|oef_now|oef_lang)\b
scope: entity.name.function.wims.special #comment: Wims special vars
- match: ^:?\(title|language|author|email|format|css|keywords|credits|description|observation|precision|range|computeanswer|statement|answer|choice|condition|solution|hint|help|feedback|steps|nextstep|conditions|latex)\b
scope: entity.name.function.wims.oefcommands #comment: OEF commands, starts at line beginning
scope: entity.name.function.wims.oef.answer #answer parameters like “{type=”
scope: string.name.wims.record #comment: Record, “:” at line beginning
scope: entity.name.function.wims.oefcommands #comment: OEF commands, starting everywhere
- match: \special{\s*(expandlines|imagefill|help|tabs2lines|rename|tooltip|codeinput|imageinput|mathmlinput|drawinput)\b
scope: entity.name.function.wims.oefspecials #comment: OEF special commands
- match: \b(algexp|aset|atext|case|checkbox|chembrut|chemclick|chemdraw|chemeq|chessgame|chset|click|clickfill|clicktile|compose|coord|correspond|crossword|default|dragfill|equation|flashcard|formal|fset|function|geogebra|javacurve|jmolclick|jsxgraph|jsxgraphcurve|keyboard|litexp|mark|matrix|menu|multipleclick|nocase|numeric|numexp|puzzle|radio|range|raw|reorder|set|sigunits|symtext|units|vector|wlist)\b
scope: entity.name.function.wims, string.name.function.wims #comment: OEF special commands
scope: entity.name.function.wimscommand #comment: Wims functions, starting with “!” (like “!changeto”)…
scope: variable.parameter.wims #comment: Variables like \PARAM1, \TM_SELECTION…
scope: keyword.operator #comment: numerical operators…
scope: constant.numeric, support.type #comment: constantes numériques
scope: entity.name.function.wims.oef.models #comment: OEF commands for models, starts at line beginning
scope: variable.parameter.wims #comment: Wims known variables like $embraced_randitem, $oef_help…
push:
- match: \) pop: true
- include: scope:text.tex.math
#comment: LaTeX Maths \(\sqrt{\frac{\x}{\y}})
- match: \( push: curve_brackets
- match: \) scope: invalid.illegal.stray-bracket-end
- match: \[ push: square_brackets
- match: \] scope: invalid.illegal.stray-bracket-end
#- match: \{
#- match: \}
curve_brackets:
- match: \) pop: true
- include: wims_oef
square_brackets:
- match: \] pop: true
- include: wims_oef
curly_brackets:
- match: \} pop: true
- include: wims_oef