Added support for METAFONT (#3465)
Includes the METAFONT language to supported languages in Prism. METAFONT is a language for fontdrawing and fontmaking, especially for fonts destined to TeX. While old in various regards its legacy endures in METAPOST or in the TikZ syntax.
This commit is contained in:
parent
4c87d4186a
commit
2815f69997
File diff suppressed because one or more lines are too long
|
@ -902,6 +902,10 @@
|
|||
"title": "Mermaid",
|
||||
"owner": "RunDevelopment"
|
||||
},
|
||||
"metafont": {
|
||||
"title": "METAFONT",
|
||||
"owner": "LaeriExNihilo"
|
||||
},
|
||||
"mizar": {
|
||||
"title": "Mizar",
|
||||
"owner": "Golmote"
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
Prism.languages.metafont = {
|
||||
// Syntax of METAFONT with the added (public) elements of PlainMETAFONT. Except for internal quantities they are expected to be rarely redefined. Freely inspired by the syntax of Christophe Grandsire for the Crimson Editor.
|
||||
'comment': {
|
||||
pattern: /%.*/,
|
||||
greedy: true
|
||||
},
|
||||
'string': {
|
||||
pattern: /"[^\r\n"]*"/,
|
||||
greedy: true
|
||||
},
|
||||
'number': /\d*\.?\d+/,
|
||||
'boolean': /\b(?:false|true)\b/,
|
||||
'punctuation': [
|
||||
/[,;()]/,
|
||||
{
|
||||
pattern: /(^|[^{}])(?:\{|\})(?![{}])/,
|
||||
lookbehind: true
|
||||
},
|
||||
{
|
||||
pattern: /(^|[^[])\[(?!\[)/,
|
||||
lookbehind: true
|
||||
},
|
||||
{
|
||||
pattern: /(^|[^\]])\](?!\])/,
|
||||
lookbehind: true
|
||||
}
|
||||
],
|
||||
'constant': [
|
||||
{
|
||||
pattern: /(^|[^!?])\?\?\?(?![!?])/,
|
||||
lookbehind: true
|
||||
},
|
||||
{
|
||||
pattern: /(^|[^/*\\])(?:\\|\\\\)(?![/*\\])/,
|
||||
lookbehind: true
|
||||
},
|
||||
/\b(?:_|blankpicture|bp|cc|cm|dd|ditto|down|eps|epsilon|fullcircle|halfcircle|identity|in|infinity|left|mm|nullpen|nullpicture|origin|pc|penrazor|penspeck|pensquare|penstroke|proof|pt|quartercircle|relax|right|smoke|unitpixel|unitsquare|up)\b/
|
||||
],
|
||||
'quantity': {
|
||||
pattern: /\b(?:autorounding|blacker|boundarychar|charcode|chardp|chardx|chardy|charext|charht|charic|charwd|currentwindow|day|designsize|displaying|fillin|fontmaking|granularity|hppp|join_radius|month|o_correction|pausing|pen_(?:bot|lft|rt|top)|pixels_per_inch|proofing|showstopping|smoothing|time|tolerance|tracingcapsules|tracingchoices|tracingcommands|tracingedges|tracingequations|tracingmacros|tracingonline|tracingoutput|tracingpens|tracingrestores|tracingspecs|tracingstats|tracingtitles|turningcheck|vppp|warningcheck|xoffset|year|yoffset)\b/,
|
||||
alias: 'keyword'
|
||||
},
|
||||
'command': {
|
||||
pattern: /\b(?:addto|batchmode|charlist|cull|display|errhelp|errmessage|errorstopmode|everyjob|extensible|fontdimen|headerbyte|inner|interim|let|ligtable|message|newinternal|nonstopmode|numspecial|openwindow|outer|randomseed|save|scrollmode|shipout|show|showdependencies|showstats|showtoken|showvariable|special)\b/,
|
||||
alias: 'builtin'
|
||||
},
|
||||
'operator': [
|
||||
{
|
||||
pattern: /(^|[^>=<:|])(?:<|<=|=|=:|\|=:|\|=:>|=:\|>|=:\||\|=:\||\|=:\|>|\|=:\|>>|>|>=|:|:=|<>|::|\|\|:)(?![>=<:|])/,
|
||||
lookbehind: true
|
||||
},
|
||||
{
|
||||
pattern: /(^|[^+-])(?:\+|\+\+|-{1,3}|\+-\+)(?![+-])/,
|
||||
lookbehind: true
|
||||
},
|
||||
{
|
||||
pattern: /(^|[^/*\\])(?:\*|\*\*|\/)(?![/*\\])/,
|
||||
lookbehind: true
|
||||
},
|
||||
{
|
||||
pattern: /(^|[^.])(?:\.{2,3})(?!\.)/,
|
||||
lookbehind: true
|
||||
},
|
||||
{
|
||||
pattern: /(^|[^@#&$])&(?![@#&$])/,
|
||||
lookbehind: true
|
||||
},
|
||||
/\b(?:and|not|or)\b/
|
||||
],
|
||||
'macro': {
|
||||
pattern: /\b(?:abs|beginchar|bot|byte|capsule_def|ceiling|change_width|clear_pen_memory|clearit|clearpen|clearxy|counterclockwise|cullit|cutdraw|cutoff|decr|define_blacker_pixels|define_corrected_pixels|define_good_x_pixels|define_good_y_pixels|define_horizontal_corrected_pixels|define_pixels|define_whole_blacker_pixels|define_whole_pixels|define_whole_vertical_blacker_pixels|define_whole_vertical_pixels|dir|direction|directionpoint|div|dotprod|downto|draw|drawdot|endchar|erase|fill|filldraw|fix_units|flex|font_coding_scheme|font_extra_space|font_identifier|font_normal_shrink|font_normal_space|font_normal_stretch|font_quad|font_size|font_slant|font_x_height|gfcorners|gobble|gobbled|good\.(?:bot|lft|rt|top|x|y)|grayfont|hide|hround|imagerules|incr|interact|interpath|intersectionpoint|inverse|italcorr|killtext|labelfont|labels|lft|loggingall|lowres_fix|makegrid|makelabel(?:\.(?:bot|lft|rt|top)(?:\.nodot)?)?|max|min|mod|mode_def|mode_setup|nodisplays|notransforms|numtok|openit|penlabels|penpos|pickup|proofoffset|proofrule|proofrulethickness|range|reflectedabout|rotatedabout|rotatedaround|round|rt|savepen|screenchars|screenrule|screenstrokes|shipit|showit|slantfont|softjoin|solve|stop|superellipse|tensepath|thru|titlefont|top|tracingall|tracingnone|undraw|undrawdot|unfill|unfilldraw|upto|vround)\b/,
|
||||
alias: 'function'
|
||||
},
|
||||
'builtin': /\b(?:ASCII|angle|char|cosd|decimal|directiontime|floor|hex|intersectiontimes|jobname|known|length|makepath|makepen|mexp|mlog|normaldeviate|oct|odd|pencircle|penoffset|point|postcontrol|precontrol|reverse|rotated|sind|sqrt|str|subpath|substring|totalweight|turningnumber|uniformdeviate|unknown|xpart|xxpart|xypart|ypart|yxpart|yypart)\b/,
|
||||
'keyword': /\b(?:also|at|atleast|begingroup|charexists|contour|controls|curl|cycle|def|delimiters|doublepath|dropping|dump|else|elseif|end|enddef|endfor|endgroup|endinput|exitif|exitunless|expandafter|fi|for|forever|forsuffixes|from|if|input|inwindow|keeping|kern|of|primarydef|quote|readstring|scaled|scantokens|secondarydef|shifted|skipto|slanted|step|tension|tertiarydef|to|transformed|until|vardef|withpen|withweight|xscaled|yscaled|zscaled)\b/,
|
||||
'type': {
|
||||
pattern: /\b(?:boolean|expr|numeric|pair|path|pen|picture|primary|secondary|string|suffix|tertiary|text|transform)\b/,
|
||||
alias: 'property'
|
||||
},
|
||||
'variable': {
|
||||
pattern: /(^|[^@#&$])(?:@#|#@|#|@)(?![@#&$])|\b(?:aspect_ratio|currentpen|currentpicture|currenttransform|d|extra_beginchar|extra_endchar|extra_setup|h|localfont|mag|mode|screen_cols|screen_rows|w|whatever|x|y|z)\b/,
|
||||
lookbehind: true
|
||||
}
|
||||
};
|
|
@ -0,0 +1 @@
|
|||
Prism.languages.metafont={comment:{pattern:/%.*/,greedy:!0},string:{pattern:/"[^\r\n"]*"/,greedy:!0},number:/\d*\.?\d+/,boolean:/\b(?:false|true)\b/,punctuation:[/[,;()]/,{pattern:/(^|[^{}])(?:\{|\})(?![{}])/,lookbehind:!0},{pattern:/(^|[^[])\[(?!\[)/,lookbehind:!0},{pattern:/(^|[^\]])\](?!\])/,lookbehind:!0}],constant:[{pattern:/(^|[^!?])\?\?\?(?![!?])/,lookbehind:!0},{pattern:/(^|[^/*\\])(?:\\|\\\\)(?![/*\\])/,lookbehind:!0},/\b(?:_|blankpicture|bp|cc|cm|dd|ditto|down|eps|epsilon|fullcircle|halfcircle|identity|in|infinity|left|mm|nullpen|nullpicture|origin|pc|penrazor|penspeck|pensquare|penstroke|proof|pt|quartercircle|relax|right|smoke|unitpixel|unitsquare|up)\b/],quantity:{pattern:/\b(?:autorounding|blacker|boundarychar|charcode|chardp|chardx|chardy|charext|charht|charic|charwd|currentwindow|day|designsize|displaying|fillin|fontmaking|granularity|hppp|join_radius|month|o_correction|pausing|pen_(?:bot|lft|rt|top)|pixels_per_inch|proofing|showstopping|smoothing|time|tolerance|tracingcapsules|tracingchoices|tracingcommands|tracingedges|tracingequations|tracingmacros|tracingonline|tracingoutput|tracingpens|tracingrestores|tracingspecs|tracingstats|tracingtitles|turningcheck|vppp|warningcheck|xoffset|year|yoffset)\b/,alias:"keyword"},command:{pattern:/\b(?:addto|batchmode|charlist|cull|display|errhelp|errmessage|errorstopmode|everyjob|extensible|fontdimen|headerbyte|inner|interim|let|ligtable|message|newinternal|nonstopmode|numspecial|openwindow|outer|randomseed|save|scrollmode|shipout|show|showdependencies|showstats|showtoken|showvariable|special)\b/,alias:"builtin"},operator:[{pattern:/(^|[^>=<:|])(?:<|<=|=|=:|\|=:|\|=:>|=:\|>|=:\||\|=:\||\|=:\|>|\|=:\|>>|>|>=|:|:=|<>|::|\|\|:)(?![>=<:|])/,lookbehind:!0},{pattern:/(^|[^+-])(?:\+|\+\+|-{1,3}|\+-\+)(?![+-])/,lookbehind:!0},{pattern:/(^|[^/*\\])(?:\*|\*\*|\/)(?![/*\\])/,lookbehind:!0},{pattern:/(^|[^.])(?:\.{2,3})(?!\.)/,lookbehind:!0},{pattern:/(^|[^@#&$])&(?![@#&$])/,lookbehind:!0},/\b(?:and|not|or)\b/],macro:{pattern:/\b(?:abs|beginchar|bot|byte|capsule_def|ceiling|change_width|clear_pen_memory|clearit|clearpen|clearxy|counterclockwise|cullit|cutdraw|cutoff|decr|define_blacker_pixels|define_corrected_pixels|define_good_x_pixels|define_good_y_pixels|define_horizontal_corrected_pixels|define_pixels|define_whole_blacker_pixels|define_whole_pixels|define_whole_vertical_blacker_pixels|define_whole_vertical_pixels|dir|direction|directionpoint|div|dotprod|downto|draw|drawdot|endchar|erase|fill|filldraw|fix_units|flex|font_coding_scheme|font_extra_space|font_identifier|font_normal_shrink|font_normal_space|font_normal_stretch|font_quad|font_size|font_slant|font_x_height|gfcorners|gobble|gobbled|good\.(?:bot|lft|rt|top|x|y)|grayfont|hide|hround|imagerules|incr|interact|interpath|intersectionpoint|inverse|italcorr|killtext|labelfont|labels|lft|loggingall|lowres_fix|makegrid|makelabel(?:\.(?:bot|lft|rt|top)(?:\.nodot)?)?|max|min|mod|mode_def|mode_setup|nodisplays|notransforms|numtok|openit|penlabels|penpos|pickup|proofoffset|proofrule|proofrulethickness|range|reflectedabout|rotatedabout|rotatedaround|round|rt|savepen|screenchars|screenrule|screenstrokes|shipit|showit|slantfont|softjoin|solve|stop|superellipse|tensepath|thru|titlefont|top|tracingall|tracingnone|undraw|undrawdot|unfill|unfilldraw|upto|vround)\b/,alias:"function"},builtin:/\b(?:ASCII|angle|char|cosd|decimal|directiontime|floor|hex|intersectiontimes|jobname|known|length|makepath|makepen|mexp|mlog|normaldeviate|oct|odd|pencircle|penoffset|point|postcontrol|precontrol|reverse|rotated|sind|sqrt|str|subpath|substring|totalweight|turningnumber|uniformdeviate|unknown|xpart|xxpart|xypart|ypart|yxpart|yypart)\b/,keyword:/\b(?:also|at|atleast|begingroup|charexists|contour|controls|curl|cycle|def|delimiters|doublepath|dropping|dump|else|elseif|end|enddef|endfor|endgroup|endinput|exitif|exitunless|expandafter|fi|for|forever|forsuffixes|from|if|input|inwindow|keeping|kern|of|primarydef|quote|readstring|scaled|scantokens|secondarydef|shifted|skipto|slanted|step|tension|tertiarydef|to|transformed|until|vardef|withpen|withweight|xscaled|yscaled|zscaled)\b/,type:{pattern:/\b(?:boolean|expr|numeric|pair|path|pen|picture|primary|secondary|string|suffix|tertiary|text|transform)\b/,alias:"property"},variable:{pattern:/(^|[^@#&$])(?:@#|#@|#|@)(?![@#&$])|\b(?:aspect_ratio|currentpen|currentpicture|currenttransform|d|extra_beginchar|extra_endchar|extra_setup|h|localfont|mag|mode|screen_cols|screen_rows|w|whatever|x|y|z)\b/,lookbehind:!0}};
|
|
@ -0,0 +1,21 @@
|
|||
<h2>Comments and strings</h2>
|
||||
<pre><code>%This makes a comment.
|
||||
"While this is a string."</code></pre>
|
||||
|
||||
<h2>Numbers</h2>
|
||||
<pre><code>0 1.2 .3</code></pre>
|
||||
|
||||
<h2>Operators</h2>
|
||||
<pre><code>eps*256>=1<>true
|
||||
""&ditto
|
||||
z1..z2--z3
|
||||
5+-+4=3</code></pre>
|
||||
|
||||
<h2>Types</h2>
|
||||
<pre><code>path p[],q[]</code></pre>
|
||||
|
||||
<h2>Concrete example</h2>
|
||||
<pre><code>% From plain.mf
|
||||
vardef penpos@#(expr b,d) =
|
||||
(x@#r-x@#l,y@#r-y@#l)=(b,0) rotated d;
|
||||
x@#=.5(x@#l+x@#r); y@#=.5(y@#l+y@#r) enddef;</code></pre>
|
|
@ -240,14 +240,68 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@octokit/auth-token": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.2.tgz",
|
||||
"integrity": "sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ==",
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz",
|
||||
"integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@octokit/types": "^5.0.0"
|
||||
"@octokit/types": "^6.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/auth-token/node_modules/@octokit/types": {
|
||||
"version": "6.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.34.0.tgz",
|
||||
"integrity": "sha512-s1zLBjWhdEI2zwaoSgyOFoKSl109CUcVBCc7biPJ3aAf6LGLU6szDvi31JPU7bxfla2lqfhjbbg/5DdFNxOwHw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@octokit/openapi-types": "^11.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/core": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz",
|
||||
"integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@octokit/auth-token": "^2.4.4",
|
||||
"@octokit/graphql": "^4.5.8",
|
||||
"@octokit/request": "^5.6.3",
|
||||
"@octokit/request-error": "^2.0.5",
|
||||
"@octokit/types": "^6.0.3",
|
||||
"before-after-hook": "^2.2.0",
|
||||
"universal-user-agent": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/core/node_modules/@octokit/request-error": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
|
||||
"integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@octokit/types": "^6.0.3",
|
||||
"deprecation": "^2.0.0",
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/core/node_modules/@octokit/types": {
|
||||
"version": "6.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.34.0.tgz",
|
||||
"integrity": "sha512-s1zLBjWhdEI2zwaoSgyOFoKSl109CUcVBCc7biPJ3aAf6LGLU6szDvi31JPU7bxfla2lqfhjbbg/5DdFNxOwHw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@octokit/openapi-types": "^11.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/core/node_modules/universal-user-agent": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
|
||||
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@octokit/endpoint": {
|
||||
"version": "6.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.8.tgz",
|
||||
|
@ -274,6 +328,41 @@
|
|||
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@octokit/graphql": {
|
||||
"version": "4.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz",
|
||||
"integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@octokit/request": "^5.6.0",
|
||||
"@octokit/types": "^6.0.3",
|
||||
"universal-user-agent": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/graphql/node_modules/@octokit/types": {
|
||||
"version": "6.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.34.0.tgz",
|
||||
"integrity": "sha512-s1zLBjWhdEI2zwaoSgyOFoKSl109CUcVBCc7biPJ3aAf6LGLU6szDvi31JPU7bxfla2lqfhjbbg/5DdFNxOwHw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@octokit/openapi-types": "^11.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/graphql/node_modules/universal-user-agent": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
|
||||
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@octokit/openapi-types": {
|
||||
"version": "11.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-11.2.0.tgz",
|
||||
"integrity": "sha512-PBsVO+15KSlGmiI8QAzaqvsNlZlrDlyAJYcrXBCvVUxCp7VnXjkwPoFHgjEJXx3WF9BAwkA6nfCUA7i9sODzKA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@octokit/plugin-paginate-rest": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz",
|
||||
|
@ -321,18 +410,16 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@octokit/request": {
|
||||
"version": "5.4.9",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.9.tgz",
|
||||
"integrity": "sha512-CzwVvRyimIM1h2n9pLVYfTDmX9m+KHSgCpqPsY8F1NdEK8IaWqXhSBXsdjOBFZSpEcxNEeg4p0UO9cQ8EnOCLA==",
|
||||
"version": "5.6.3",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
|
||||
"integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@octokit/endpoint": "^6.0.1",
|
||||
"@octokit/request-error": "^2.0.0",
|
||||
"@octokit/types": "^5.0.0",
|
||||
"deprecation": "^2.0.0",
|
||||
"@octokit/request-error": "^2.1.0",
|
||||
"@octokit/types": "^6.16.1",
|
||||
"is-plain-object": "^5.0.0",
|
||||
"node-fetch": "^2.6.1",
|
||||
"once": "^1.4.0",
|
||||
"node-fetch": "^2.6.7",
|
||||
"universal-user-agent": "^6.0.0"
|
||||
}
|
||||
},
|
||||
|
@ -357,16 +444,25 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@octokit/request/node_modules/@octokit/request-error": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.2.tgz",
|
||||
"integrity": "sha512-2BrmnvVSV1MXQvEkrb9zwzP0wXFNbPJij922kYBTLIlIafukrGOb+ABBT2+c6wZiuyWDH1K1zmjGQ0toN/wMWw==",
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
|
||||
"integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@octokit/types": "^5.0.1",
|
||||
"@octokit/types": "^6.0.3",
|
||||
"deprecation": "^2.0.0",
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/request/node_modules/@octokit/types": {
|
||||
"version": "6.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.34.0.tgz",
|
||||
"integrity": "sha512-s1zLBjWhdEI2zwaoSgyOFoKSl109CUcVBCc7biPJ3aAf6LGLU6szDvi31JPU7bxfla2lqfhjbbg/5DdFNxOwHw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@octokit/openapi-types": "^11.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/request/node_modules/is-plain-object": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
|
||||
|
@ -1141,9 +1237,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/before-after-hook": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz",
|
||||
"integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==",
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz",
|
||||
"integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/benchmark": {
|
||||
|
@ -11170,12 +11266,70 @@
|
|||
"dev": true
|
||||
},
|
||||
"@octokit/auth-token": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.2.tgz",
|
||||
"integrity": "sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ==",
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz",
|
||||
"integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@octokit/types": "^5.0.0"
|
||||
"@octokit/types": "^6.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@octokit/types": {
|
||||
"version": "6.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.34.0.tgz",
|
||||
"integrity": "sha512-s1zLBjWhdEI2zwaoSgyOFoKSl109CUcVBCc7biPJ3aAf6LGLU6szDvi31JPU7bxfla2lqfhjbbg/5DdFNxOwHw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@octokit/openapi-types": "^11.2.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@octokit/core": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz",
|
||||
"integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@octokit/auth-token": "^2.4.4",
|
||||
"@octokit/graphql": "^4.5.8",
|
||||
"@octokit/request": "^5.6.3",
|
||||
"@octokit/request-error": "^2.0.5",
|
||||
"@octokit/types": "^6.0.3",
|
||||
"before-after-hook": "^2.2.0",
|
||||
"universal-user-agent": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@octokit/request-error": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
|
||||
"integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@octokit/types": "^6.0.3",
|
||||
"deprecation": "^2.0.0",
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"@octokit/types": {
|
||||
"version": "6.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.34.0.tgz",
|
||||
"integrity": "sha512-s1zLBjWhdEI2zwaoSgyOFoKSl109CUcVBCc7biPJ3aAf6LGLU6szDvi31JPU7bxfla2lqfhjbbg/5DdFNxOwHw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@octokit/openapi-types": "^11.2.0"
|
||||
}
|
||||
},
|
||||
"universal-user-agent": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
|
||||
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@octokit/endpoint": {
|
||||
|
@ -11203,6 +11357,43 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"@octokit/graphql": {
|
||||
"version": "4.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz",
|
||||
"integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@octokit/request": "^5.6.0",
|
||||
"@octokit/types": "^6.0.3",
|
||||
"universal-user-agent": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@octokit/types": {
|
||||
"version": "6.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.34.0.tgz",
|
||||
"integrity": "sha512-s1zLBjWhdEI2zwaoSgyOFoKSl109CUcVBCc7biPJ3aAf6LGLU6szDvi31JPU7bxfla2lqfhjbbg/5DdFNxOwHw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@octokit/openapi-types": "^11.2.0"
|
||||
}
|
||||
},
|
||||
"universal-user-agent": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
|
||||
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@octokit/openapi-types": {
|
||||
"version": "11.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-11.2.0.tgz",
|
||||
"integrity": "sha512-PBsVO+15KSlGmiI8QAzaqvsNlZlrDlyAJYcrXBCvVUxCp7VnXjkwPoFHgjEJXx3WF9BAwkA6nfCUA7i9sODzKA==",
|
||||
"dev": true
|
||||
},
|
||||
"@octokit/plugin-paginate-rest": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz",
|
||||
|
@ -11252,32 +11443,39 @@
|
|||
}
|
||||
},
|
||||
"@octokit/request": {
|
||||
"version": "5.4.9",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.9.tgz",
|
||||
"integrity": "sha512-CzwVvRyimIM1h2n9pLVYfTDmX9m+KHSgCpqPsY8F1NdEK8IaWqXhSBXsdjOBFZSpEcxNEeg4p0UO9cQ8EnOCLA==",
|
||||
"version": "5.6.3",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
|
||||
"integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@octokit/endpoint": "^6.0.1",
|
||||
"@octokit/request-error": "^2.0.0",
|
||||
"@octokit/types": "^5.0.0",
|
||||
"deprecation": "^2.0.0",
|
||||
"@octokit/request-error": "^2.1.0",
|
||||
"@octokit/types": "^6.16.1",
|
||||
"is-plain-object": "^5.0.0",
|
||||
"node-fetch": "^2.6.1",
|
||||
"once": "^1.4.0",
|
||||
"node-fetch": "^2.6.7",
|
||||
"universal-user-agent": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@octokit/request-error": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.2.tgz",
|
||||
"integrity": "sha512-2BrmnvVSV1MXQvEkrb9zwzP0wXFNbPJij922kYBTLIlIafukrGOb+ABBT2+c6wZiuyWDH1K1zmjGQ0toN/wMWw==",
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
|
||||
"integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@octokit/types": "^5.0.1",
|
||||
"@octokit/types": "^6.0.3",
|
||||
"deprecation": "^2.0.0",
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"@octokit/types": {
|
||||
"version": "6.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.34.0.tgz",
|
||||
"integrity": "sha512-s1zLBjWhdEI2zwaoSgyOFoKSl109CUcVBCc7biPJ3aAf6LGLU6szDvi31JPU7bxfla2lqfhjbbg/5DdFNxOwHw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@octokit/openapi-types": "^11.2.0"
|
||||
}
|
||||
},
|
||||
"is-plain-object": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
|
||||
|
@ -11927,9 +12125,9 @@
|
|||
}
|
||||
},
|
||||
"before-after-hook": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz",
|
||||
"integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==",
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz",
|
||||
"integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==",
|
||||
"dev": true
|
||||
},
|
||||
"benchmark": {
|
||||
|
|
|
@ -160,6 +160,7 @@
|
|||
"matlab": "MATLAB",
|
||||
"maxscript": "MAXScript",
|
||||
"mel": "MEL",
|
||||
"metafont": "METAFONT",
|
||||
"mongodb": "MongoDB",
|
||||
"moon": "MoonScript",
|
||||
"n1ql": "N1QL",
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -57,6 +57,12 @@ const testOptions = {
|
|||
word: false,
|
||||
template: false,
|
||||
},
|
||||
|
||||
// METAFONT has a special scheme for variable names with tags, suffixes and subscripts
|
||||
'metafont': {
|
||||
word: false,
|
||||
template: false,
|
||||
},
|
||||
};
|
||||
|
||||
/** @type {Record<keyof IdentifierTestOptions, string[]>} */
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
true false
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["boolean", "true"],
|
||||
["boolean", "false"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for booleans.
|
|
@ -0,0 +1,68 @@
|
|||
addto
|
||||
batchmode
|
||||
charlist cull
|
||||
display
|
||||
errhelp errmessage errorstopmode everyjob extensible
|
||||
fontdimen
|
||||
headerbyte
|
||||
inner interim
|
||||
let ligtable
|
||||
message
|
||||
newinternal nonstopmode numspecial
|
||||
openwindow outer
|
||||
randomseed
|
||||
save scrollmode show showdependencies showstats showtoken showvariable shipout special
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["command", "addto"],
|
||||
|
||||
["command", "batchmode"],
|
||||
|
||||
["command", "charlist"],
|
||||
["command", "cull"],
|
||||
|
||||
["command", "display"],
|
||||
|
||||
["command", "errhelp"],
|
||||
["command", "errmessage"],
|
||||
["command", "errorstopmode"],
|
||||
["command", "everyjob"],
|
||||
["command", "extensible"],
|
||||
|
||||
["command", "fontdimen"],
|
||||
|
||||
["command", "headerbyte"],
|
||||
|
||||
["command", "inner"],
|
||||
["command", "interim"],
|
||||
|
||||
["command", "let"],
|
||||
["command", "ligtable"],
|
||||
|
||||
["command", "message"],
|
||||
|
||||
["command", "newinternal"],
|
||||
["command", "nonstopmode"],
|
||||
["command", "numspecial"],
|
||||
|
||||
["command", "openwindow"],
|
||||
["command", "outer"],
|
||||
|
||||
["command", "randomseed"],
|
||||
|
||||
["command", "save"],
|
||||
["command", "scrollmode"],
|
||||
["command", "show"],
|
||||
["command", "showdependencies"],
|
||||
["command", "showstats"],
|
||||
["command", "showtoken"],
|
||||
["command", "showvariable"],
|
||||
["command", "shipout"],
|
||||
["command", "special"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for commands.
|
|
@ -0,0 +1,97 @@
|
|||
% Length constants
|
||||
bp cc cm dd in mm pc pt
|
||||
|
||||
% Pair constants
|
||||
down left origin right up
|
||||
|
||||
% Numeric constants
|
||||
eps epsilon infinity _ % _ is -1, as per Knuth: "internal constant to make macros unreadable but shorter"
|
||||
|
||||
% Path constants
|
||||
fullcircle halfcircle quartercircle unitsquare
|
||||
|
||||
% Pen constant
|
||||
nullpen penrazor penspeck pensquare penstroke
|
||||
|
||||
% Picture constants
|
||||
blankpicture nullpicture unitpixel
|
||||
|
||||
% String constant
|
||||
ditto
|
||||
|
||||
% Transform constant
|
||||
identity
|
||||
|
||||
% Other constants
|
||||
proof relax smoke \ \\ ???
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["comment", "% Length constants"],
|
||||
|
||||
["constant", "bp"],
|
||||
["constant", "cc"],
|
||||
["constant", "cm"],
|
||||
["constant", "dd"],
|
||||
["constant", "in"],
|
||||
["constant", "mm"],
|
||||
["constant", "pc"],
|
||||
["constant", "pt"],
|
||||
|
||||
["comment", "% Pair constants"],
|
||||
|
||||
["constant", "down"],
|
||||
["constant", "left"],
|
||||
["constant", "origin"],
|
||||
["constant", "right"],
|
||||
["constant", "up"],
|
||||
|
||||
["comment", "% Numeric constants"],
|
||||
|
||||
["constant", "eps"],
|
||||
["constant", "epsilon"],
|
||||
["constant", "infinity"],
|
||||
["constant", "_"],
|
||||
["comment", "% _ is -1, as per Knuth: \"internal constant to make macros unreadable but shorter\""],
|
||||
|
||||
["comment", "% Path constants"],
|
||||
|
||||
["constant", "fullcircle"],
|
||||
["constant", "halfcircle"],
|
||||
["constant", "quartercircle"],
|
||||
["constant", "unitsquare"],
|
||||
|
||||
["comment", "% Pen constant"],
|
||||
|
||||
["constant", "nullpen"],
|
||||
["constant", "penrazor"],
|
||||
["constant", "penspeck"],
|
||||
["constant", "pensquare"],
|
||||
["constant", "penstroke"],
|
||||
|
||||
["comment", "% Picture constants"],
|
||||
|
||||
["constant", "blankpicture"],
|
||||
["constant", "nullpicture"],
|
||||
["constant", "unitpixel"],
|
||||
|
||||
["comment", "% String constant"],
|
||||
["constant", "ditto"],
|
||||
|
||||
["comment", "% Transform constant"],
|
||||
["constant", "identity"],
|
||||
|
||||
["comment", "% Other constants"],
|
||||
|
||||
["constant", "proof"],
|
||||
["constant", "relax"],
|
||||
["constant", "smoke"],
|
||||
["constant", "\\"],
|
||||
["constant", "\\\\"],
|
||||
["constant", "???"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for constants best not to be redefined.
|
|
@ -0,0 +1,96 @@
|
|||
autorounding
|
||||
boundarychar
|
||||
charcode chardp chardx chardy charext charht charic charwd
|
||||
day designsize
|
||||
fillin fontmaking
|
||||
granularity
|
||||
hppp
|
||||
month
|
||||
pausing proofing
|
||||
showstopping smoothing
|
||||
time tracingcapsules tracingchoices tracingcommands tracingedges tracingequations tracingmacros tracingonline tracingoutput tracingpens tracingrestores tracingspecs tracingstats tracingtitles turningcheck
|
||||
vppp
|
||||
warningcheck
|
||||
xoffset
|
||||
year yoffset
|
||||
|
||||
% From PlainMETAFONT
|
||||
blacker currentwindow displaying join_radius o_correction pen_bot pen_lft pen_rt pen_top pixels_per_inch tolerance
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["quantity", "autorounding"],
|
||||
|
||||
["quantity", "boundarychar"],
|
||||
|
||||
["quantity", "charcode"],
|
||||
["quantity", "chardp"],
|
||||
["quantity", "chardx"],
|
||||
["quantity", "chardy"],
|
||||
["quantity", "charext"],
|
||||
["quantity", "charht"],
|
||||
["quantity", "charic"],
|
||||
["quantity", "charwd"],
|
||||
|
||||
["quantity", "day"],
|
||||
["quantity", "designsize"],
|
||||
|
||||
["quantity", "fillin"],
|
||||
["quantity", "fontmaking"],
|
||||
|
||||
["quantity", "granularity"],
|
||||
|
||||
["quantity", "hppp"],
|
||||
|
||||
["quantity", "month"],
|
||||
|
||||
["quantity", "pausing"],
|
||||
["quantity", "proofing"],
|
||||
|
||||
["quantity", "showstopping"],
|
||||
["quantity", "smoothing"],
|
||||
|
||||
["quantity", "time"],
|
||||
["quantity", "tracingcapsules"],
|
||||
["quantity", "tracingchoices"],
|
||||
["quantity", "tracingcommands"],
|
||||
["quantity", "tracingedges"],
|
||||
["quantity", "tracingequations"],
|
||||
["quantity", "tracingmacros"],
|
||||
["quantity", "tracingonline"],
|
||||
["quantity", "tracingoutput"],
|
||||
["quantity", "tracingpens"],
|
||||
["quantity", "tracingrestores"],
|
||||
["quantity", "tracingspecs"],
|
||||
["quantity", "tracingstats"],
|
||||
["quantity", "tracingtitles"],
|
||||
["quantity", "turningcheck"],
|
||||
|
||||
["quantity", "vppp"],
|
||||
|
||||
["quantity", "warningcheck"],
|
||||
|
||||
["quantity", "xoffset"],
|
||||
|
||||
["quantity", "year"],
|
||||
["quantity", "yoffset"],
|
||||
|
||||
["comment", "% From PlainMETAFONT"],
|
||||
|
||||
["quantity", "blacker"],
|
||||
["quantity", "currentwindow"],
|
||||
["quantity", "displaying"],
|
||||
["quantity", "join_radius"],
|
||||
["quantity", "o_correction"],
|
||||
["quantity", "pen_bot"],
|
||||
["quantity", "pen_lft"],
|
||||
["quantity", "pen_rt"],
|
||||
["quantity", "pen_top"],
|
||||
["quantity", "pixels_per_inch"],
|
||||
["quantity", "tolerance"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for internal quantities.
|
|
@ -0,0 +1,104 @@
|
|||
also at atleast
|
||||
begingroup
|
||||
charexists contour controls curl cycle
|
||||
def delimiters doublepath dropping dump
|
||||
else elseif end enddef endfor endgroup endinput exitif exitunless expandafter
|
||||
fi for forever forsuffixes from
|
||||
if input inwindow
|
||||
keeping kern
|
||||
of
|
||||
primarydef
|
||||
quote
|
||||
readstring
|
||||
scaled scantokens secondarydef shifted skipto slanted step
|
||||
tension tertiarydef to transformed
|
||||
until
|
||||
vardef
|
||||
withpen withweight
|
||||
xscaled
|
||||
yscaled
|
||||
zscaled
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["keyword", "also"],
|
||||
["keyword", "at"],
|
||||
["keyword", "atleast"],
|
||||
|
||||
["keyword", "begingroup"],
|
||||
|
||||
["keyword", "charexists"],
|
||||
["keyword", "contour"],
|
||||
["keyword", "controls"],
|
||||
["keyword", "curl"],
|
||||
["keyword", "cycle"],
|
||||
|
||||
["keyword", "def"],
|
||||
["keyword", "delimiters"],
|
||||
["keyword", "doublepath"],
|
||||
["keyword", "dropping"],
|
||||
["keyword", "dump"],
|
||||
|
||||
["keyword", "else"],
|
||||
["keyword", "elseif"],
|
||||
["keyword", "end"],
|
||||
["keyword", "enddef"],
|
||||
["keyword", "endfor"],
|
||||
["keyword", "endgroup"],
|
||||
["keyword", "endinput"],
|
||||
["keyword", "exitif"],
|
||||
["keyword", "exitunless"],
|
||||
["keyword", "expandafter"],
|
||||
|
||||
["keyword", "fi"],
|
||||
["keyword", "for"],
|
||||
["keyword", "forever"],
|
||||
["keyword", "forsuffixes"],
|
||||
["keyword", "from"],
|
||||
|
||||
["keyword", "if"],
|
||||
["keyword", "input"],
|
||||
["keyword", "inwindow"],
|
||||
|
||||
["keyword", "keeping"],
|
||||
["keyword", "kern"],
|
||||
|
||||
["keyword", "of"],
|
||||
|
||||
["keyword", "primarydef"],
|
||||
|
||||
["keyword", "quote"],
|
||||
|
||||
["keyword", "readstring"],
|
||||
|
||||
["keyword", "scaled"],
|
||||
["keyword", "scantokens"],
|
||||
["keyword", "secondarydef"],
|
||||
["keyword", "shifted"],
|
||||
["keyword", "skipto"],
|
||||
["keyword", "slanted"],
|
||||
["keyword", "step"],
|
||||
|
||||
["keyword", "tension"],
|
||||
["keyword", "tertiarydef"],
|
||||
["keyword", "to"],
|
||||
["keyword", "transformed"],
|
||||
|
||||
["keyword", "until"],
|
||||
|
||||
["keyword", "vardef"],
|
||||
|
||||
["keyword", "withpen"],
|
||||
["keyword", "withweight"],
|
||||
|
||||
["keyword", "xscaled"],
|
||||
|
||||
["keyword", "yscaled"],
|
||||
|
||||
["keyword", "zscaled"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for keywords.
|
|
@ -0,0 +1,30 @@
|
|||
beginchar cullit decr define_pixels div draw downto endchar fill flex incr max min mod mode_setup penlabels penpos shipit showit upto
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["macro", "beginchar"],
|
||||
["macro", "cullit"],
|
||||
["macro", "decr"],
|
||||
["macro", "define_pixels"],
|
||||
["macro", "div"],
|
||||
["macro", "draw"],
|
||||
["macro", "downto"],
|
||||
["macro", "endchar"],
|
||||
["macro", "fill"],
|
||||
["macro", "flex"],
|
||||
["macro", "incr"],
|
||||
["macro", "max"],
|
||||
["macro", "min"],
|
||||
["macro", "mod"],
|
||||
["macro", "mode_setup"],
|
||||
["macro", "penlabels"],
|
||||
["macro", "penpos"],
|
||||
["macro", "shipit"],
|
||||
["macro", "showit"],
|
||||
["macro", "upto"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for a few important macros.
|
|
@ -0,0 +1,15 @@
|
|||
42
|
||||
3.14
|
||||
.34
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["number", "42"],
|
||||
["number", "3.14"],
|
||||
["number", ".34"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for numbers.
|
|
@ -0,0 +1,83 @@
|
|||
: :=
|
||||
|
||||
% Boolean operators
|
||||
and or not <>
|
||||
|
||||
% Numeric operators
|
||||
< <= >= > = <>
|
||||
* ** / + - ++ +-+
|
||||
|
||||
% Path operators
|
||||
& .. ... -- ---
|
||||
|
||||
% String operators
|
||||
& < <= >= > = <>
|
||||
|
||||
% Ligature operators
|
||||
=: :: |=: |=:> =:| =:|> |=:| |=:|> |=:|>> ||:
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["operator", ":"],
|
||||
["operator", ":="],
|
||||
|
||||
["comment", "% Boolean operators"],
|
||||
|
||||
["operator", "and"],
|
||||
["operator", "or"],
|
||||
["operator", "not"],
|
||||
["operator", "<>"],
|
||||
|
||||
["comment", "% Numeric operators"],
|
||||
|
||||
["operator", "<"],
|
||||
["operator", "<="],
|
||||
["operator", ">="],
|
||||
["operator", ">"],
|
||||
["operator", "="],
|
||||
["operator", "<>"],
|
||||
|
||||
["operator", "*"],
|
||||
["operator", "**"],
|
||||
["operator", "/"],
|
||||
["operator", "+"],
|
||||
["operator", "-"],
|
||||
["operator", "++"],
|
||||
["operator", "+-+"],
|
||||
|
||||
["comment", "% Path operators"],
|
||||
|
||||
["operator", "&"],
|
||||
["operator", ".."],
|
||||
["operator", "..."],
|
||||
["operator", "--"],
|
||||
["operator", "---"],
|
||||
|
||||
["comment", "% String operators"],
|
||||
|
||||
["operator", "&"],
|
||||
["operator", "<"],
|
||||
["operator", "<="],
|
||||
["operator", ">="],
|
||||
["operator", ">"],
|
||||
["operator", "="],
|
||||
["operator", "<>"],
|
||||
|
||||
["comment", "% Ligature operators"],
|
||||
|
||||
["operator", "=:"],
|
||||
["operator", "::"],
|
||||
["operator", "|=:"],
|
||||
["operator", "|=:>"],
|
||||
["operator", "=:|"],
|
||||
["operator", "=:|>"],
|
||||
["operator", "|=:|"],
|
||||
["operator", "|=:|>"],
|
||||
["operator", "|=:|>>"],
|
||||
["operator", "||:"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for operators.
|
|
@ -0,0 +1,25 @@
|
|||
{ }
|
||||
|
||||
% Loners
|
||||
,;()
|
||||
[]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["punctuation", "{"], ["punctuation", "}"],
|
||||
|
||||
["comment", "% Loners"],
|
||||
|
||||
["punctuation", ","],
|
||||
["punctuation", ";"],
|
||||
["punctuation", "("],
|
||||
["punctuation", ")"],
|
||||
|
||||
["punctuation", "["],
|
||||
["punctuation", "]"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for punctuation and delimiters.
|
|
@ -0,0 +1,70 @@
|
|||
ASCII
|
||||
angle
|
||||
char cosd
|
||||
decimal directiontime
|
||||
floor
|
||||
hex
|
||||
intersectiontimes
|
||||
jobname
|
||||
known
|
||||
length
|
||||
makepath makepen mexp mlog
|
||||
normaldeviate
|
||||
oct odd
|
||||
pencircle penoffset point postcontrol precontrol
|
||||
reverse rotated
|
||||
sind sqrt str subpath substring
|
||||
totalweight turningnumber
|
||||
uniformdeviate unknown
|
||||
xpart xxpart xypart
|
||||
ypart yxpart yypart
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["builtin", "ASCII"],
|
||||
["builtin", "angle"],
|
||||
["builtin", "char"],
|
||||
["builtin", "cosd"],
|
||||
["builtin", "decimal"],
|
||||
["builtin", "directiontime"],
|
||||
["builtin", "floor"],
|
||||
["builtin", "hex"],
|
||||
["builtin", "intersectiontimes"],
|
||||
["builtin", "jobname"],
|
||||
["builtin", "known"],
|
||||
["builtin", "length"],
|
||||
["builtin", "makepath"],
|
||||
["builtin", "makepen"],
|
||||
["builtin", "mexp"],
|
||||
["builtin", "mlog"],
|
||||
["builtin", "normaldeviate"],
|
||||
["builtin", "oct"],
|
||||
["builtin", "odd"],
|
||||
["builtin", "pencircle"],
|
||||
["builtin", "penoffset"],
|
||||
["builtin", "point"],
|
||||
["builtin", "postcontrol"],
|
||||
["builtin", "precontrol"],
|
||||
["builtin", "reverse"],
|
||||
["builtin", "rotated"],
|
||||
["builtin", "sind"],
|
||||
["builtin", "sqrt"],
|
||||
["builtin", "str"],
|
||||
["builtin", "subpath"],
|
||||
["builtin", "substring"],
|
||||
["builtin", "totalweight"],
|
||||
["builtin", "turningnumber"],
|
||||
["builtin", "uniformdeviate"],
|
||||
["builtin", "unknown"],
|
||||
["builtin", "xpart"],
|
||||
["builtin", "xxpart"],
|
||||
["builtin", "xypart"],
|
||||
["builtin", "ypart"],
|
||||
["builtin", "yxpart"],
|
||||
["builtin", "yypart"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for primitive METAFONT operations.
|
|
@ -0,0 +1,21 @@
|
|||
%
|
||||
% comment
|
||||
""
|
||||
"string"
|
||||
"text%noncomment"
|
||||
%"not string"
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["comment", "%"],
|
||||
["comment", "% comment"],
|
||||
["string", "\"\""],
|
||||
["string", "\"string\""],
|
||||
["string", "\"text%noncomment\""],
|
||||
["comment", "%\"not string\""]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for strings and comments without mangling.
|
|
@ -0,0 +1,43 @@
|
|||
% Variable type
|
||||
boolean
|
||||
numeric
|
||||
pair
|
||||
path
|
||||
pen
|
||||
picture
|
||||
string
|
||||
transform
|
||||
|
||||
% Argument type
|
||||
expr
|
||||
primary
|
||||
secondary
|
||||
suffix
|
||||
tertiary
|
||||
text
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["comment", "% Variable type"],
|
||||
["type", "boolean"],
|
||||
["type", "numeric"],
|
||||
["type", "pair"],
|
||||
["type", "path"],
|
||||
["type", "pen"],
|
||||
["type", "picture"],
|
||||
["type", "string"],
|
||||
["type", "transform"],
|
||||
|
||||
["comment", "% Argument type"],
|
||||
["type", "expr"],
|
||||
["type", "primary"],
|
||||
["type", "secondary"],
|
||||
["type", "suffix"],
|
||||
["type", "tertiary"],
|
||||
["type", "text"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for typing keywords.
|
|
@ -0,0 +1,53 @@
|
|||
% Special variables
|
||||
#@ @ @#
|
||||
whatever
|
||||
|
||||
% Chardimen variables
|
||||
d h w
|
||||
|
||||
% Position variables
|
||||
x y z
|
||||
|
||||
% Output variables
|
||||
aspect_ratio localfont mag mode screen_cols screen_rows
|
||||
|
||||
% Other variables
|
||||
currentpen currentpicture currenttransform
|
||||
extra_beginchar extra_endchar extra_setup
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["comment", "% Special variables"],
|
||||
["variable", "#@"], ["variable", "@"], ["variable", "@#"],
|
||||
["variable", "whatever"],
|
||||
|
||||
["comment", "% Chardimen variables"],
|
||||
["variable", "d"], ["variable", "h"], ["variable", "w"],
|
||||
|
||||
["comment", "% Position variables"],
|
||||
["variable", "x"], ["variable", "y"], ["variable", "z"],
|
||||
|
||||
["comment", "% Output variables"],
|
||||
|
||||
["variable", "aspect_ratio"],
|
||||
["variable", "localfont"],
|
||||
["variable", "mag"],
|
||||
["variable", "mode"],
|
||||
["variable", "screen_cols"],
|
||||
["variable", "screen_rows"],
|
||||
|
||||
["comment", "% Other variables"],
|
||||
|
||||
["variable", "currentpen"],
|
||||
["variable", "currentpicture"],
|
||||
["variable", "currenttransform"],
|
||||
|
||||
["variable", "extra_beginchar"],
|
||||
["variable", "extra_endchar"],
|
||||
["variable", "extra_setup"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for important variables.
|
Loading…
Reference in New Issue