Skip to content

Commit a3c74c2

Browse files
committed
Restructure syntaxes
1 parent 2612702 commit a3c74c2

File tree

4 files changed

+47
-25
lines changed

4 files changed

+47
-25
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to the "ti-basic" extension will be documented in this file.
44

5+
## [0.2.7] - 2024-01-23
6+
7+
### Changed
8+
9+
- Organize commands by ones ending with ` ` and `(`.
10+
- Restructure syntaxes to properly highlight more stuff
11+
512
## [0.2.6] - 2024-01-06
613

714
### Added

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ti-basic",
33
"displayName": "TI-BASIC",
4-
"version": "0.2.6",
4+
"version": "0.2.7",
55
"description": "Syntax highlighting for z80 TI-BASIC",
66
"author": {
77
"name": "TIny_Hacker",

syntaxes/ti-basic.tmLanguage.json

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@
2020
{
2121
"include": "#strings"
2222
},
23-
{
24-
"include": "#variables"
25-
},
2623
{
2724
"include": "#constants"
2825
},
2926
{
3027
"include": "#headers"
28+
},
29+
{
30+
"include": "#variables"
31+
},
32+
{
33+
"include": "#reals"
3134
}
3235
],
3336
"repository": {
@@ -39,7 +42,7 @@
3942
"patterns": [
4043
{
4144
"name": "keyword.control.8xp",
42-
"match": "(If |Then|Else|For(?=\\()|While |Repeat |End|Pause|Lbl |Goto |Wait |IS>(?=\\()|DS<(?=\\()|Menu(?=\\()|Return|Stop|GraphStyle(?=\\()|GraphColor(?=\\()|OpenLib(?=\\()|ExecLib )"
45+
"match": "(If |Then|Else|For(?=\\()|While |Repeat |End|Pause |Lbl |Goto |Wait |IS>(?=\\()|DS<(?=\\()|Menu(?=\\()|Return|Stop|GraphStyle(?=\\()|GraphColor(?=\\()|OpenLib(?=\\()|ExecLib )"
4346
},
4447
{
4548
"name": "keyword.control.8xp",
@@ -71,11 +74,15 @@
7174
},
7275
{
7376
"name": "entity.name.function.8xp",
74-
"match": "(abs|angle|ANOVA|augment|bal|binom[cp]df|checkTmr|X²([cp]df|\\-Test|GOF\\-Test)|conj|cos(h|)(⁻¹|)|cumSum|dayOfWk|dbd|▶Dec|det|dim|▶DMS|e\\^|\\|E|▶Eff|eval|expr|F[cp]df|▶F◀▶D|Fill|Fix|Float|fMax|fMin|fnInt|[fi]Part|▶Frac|gcd|geomet[cp]df|get(Date|Time)|get(Dt|Tm)(Fmt|Str)|getKey|G\\-T|\\|i|identity|imag|inString|int|ΣInt|inv(Binom|Norm|T)|irr|isClockOn|lcm|length|∆List|ln|log(BASE|)|max|mean|median|Med-Med|min|n[CP]r|n\\/d|nDeriv|▶n/d◀▶Un/d|▶Nom|normal[cp]df|npv|piecewise|poisson[cp]df|▶Polar|ΣPrn|prod|[12]\\-PropZ(Int|Test)|pxl\\-Test|P▶Rx|P▶Ry|rand|randBin|randInt|randIntNoRep|randM|randNorm|re\\^θi|real|▶Rect|ref|remainder|round|\\*row|row\\+|\\*row\\+|rowSwap|rref|R▶P[rθ]|seq|setDate|setDtFmt|setTime|setTmFmt|sin|sin⁻¹|sinh|sinh⁻¹|solve|startTmr|stdDev|su[bm]|Σ|tan|tan⁻¹|tanh|tanh⁻¹|t[cp]df|timeCnv|toString|tvm_FV|tvm_I%|tvm_N|tvm_Pmt|tv_PV|uvAxes|uwAxes|variance|vwAxes|xyLine)(?=\\()"
77+
"match": "(abs|angle|ANOVA|Asm(Comp)?|augment|bal|binom(c|p)df|checkTmr|X²((c|p)df|(GOF)?-Test)|Circle|conj|cos(⁻¹|h(⁻¹)?)?|cumSum|dayOfWk|dbd|det|dim|DS<|e\\^|▶Eff|Equ▶String|eval|expr|F(c|p)df|Fill|fM(ax|in)|fnInt|fPart|gcd|geomet(c|p)df|Get|GetCalc|get(Dt|Tm)Str|identity|imag|inString|int|ΣInt|inv(Binom|Norm|T)|iPart|irr|IS>|lcm|length|Line|ΔList|List▶matr|ln|log(BASE)?|Matr▶list|max|mean|median|min|nDeriv|▶Nom|normal(c|p)df|npv|Output|piecewise|Plot[1-3]|poisson(c|p)df|ΣPrn|prod|[1-2]\\-PropZ(Int|Test)|P(t|xl)\\-(Change|O(ff|n))|pxl\\-Test|P▶R[x-y]|rand(Bin|Int(NoRep)?|M|Norm)|real|ref|remainder|round|\\*row(\\+)?|row(\\+|Swap)|rref|R▶Pr|R▶Pθ|2\\-SampZ(Int|Test)|Select|Send|seq|set(Date|Time)|set(Dt|Tm)Fmt|Shade(X²|F|Norm|_t)?|sin(h)?(⁻¹)?|solve|Sort(A|D)|startTmr|stdDev|String▶Equ|su[bm]|summation Σ|tan(h)?(⁻¹)?|Tangent|t[cp]df|Text(Color)?|timeCnv|toString|variance|Z\\-Test)(?=\\()"
78+
},
79+
{
80+
"name": "entity.name.function.8xp",
81+
"match": "(Archive|AxesOn|BackgroundOn|BorderColor|ClrList|Disp|Draw(F|Inv)|ExpReg|Fix|FnO(ff|n)|GridDot|GridLine|Horizontal|Lbl|LinReg\\((a\\+bx|ax\\+b)\\)|LinRegT(Int|Test)|LnReg|Logistic|Manual\\-Fit|Med\\-Med| n(C|P)r|Pause|PlotsO(ff|n)|Prompt|PwrReg|Qua(d|rt)Reg|(Recall|Store)(GDB|Pic)|2\\-SampFTest|2\\-SampT(Int|Test)|SetUpEditor|SinReg|TInterval|T\\-Test|UnArchive|[12]\\-Var Stats|Vertical|Wait) "
7582
},
7683
{
7784
"name": "entity.name.function.8xp",
78-
"match": "(Archive |Asm(?=\\()|AsmComp(?=\\()|Asm84CEPrgm|AUTO|AxesOff|AxesOn|a\\+bi|BackgroundOff|BackgroundOn|BorderColor|Boxplot|Circle(?=\\()|CLASSIC|Clear Entries|ClockOff|ClockOn|ClrAllLists|ClrDraw|ClrHome|ClrList|ClrTableCoordOff|CoordOn|CubicReg|DEC|Degree|Depend(Ask|Auto)|DetectAsym(Off|On)|Diagnostic(Off|On)|Disp(Graph|Table| )|Dot\\-(Thick|Thin)|Draw(F|Inv)|Eng|Equ▶String(?=\\()|Exp(Reg|rOff|rOn)|Fn(Off|On)|Full|Func|GarbageCollect|Get(Calc)?(?=\\()|GridDot|GridLine|GridOffHoriz|Horizontal |HistogramIndpnt(Ask|Auto)|Input |Label(Off|On)|Line(?=\\()|LinReg(?=\\((a\\+bx|ax\\+b)\\))|(?<=LinReg)\\((a\\+bx|ax\\+b)\\)|LinRegT(Int|Test)|List▶matr(?=\\()|LnReg|Logistic |Manual\\-Fit|MATHPRINT|Matr▶list|ModBoxPlot|Normal|NormProbPlot|Output(?=\\()|Param|Plot[1-3](?=\\()|Plots(Off|On)|Pmt_(Bgn|End)|(►)?Polar|PolarGC|Prompt |Pt\\-(Change|Off|On)(?=\\()|PwrReg |Pxl\\-(Change|Off|On)(?=\\()|(Quad|Quart)Reg |Radian|Real|Recall(GDB|Pic) |RectGC|2\\-SampFTest |2\\-SampT(Int|Test) |2\\-SampZ(Int|Test)(?=\\()|Scatter|Sci|Select(?=\\()|Send(?=\\()|Seq|SEQ\\(n(\\+[12])?\\)|Sequential|SetUpEditor |Shade(X²|F|Norm|_t)?(?=\\()|Simul|SinReg |Sort[AD](?=\\()|STATWIZARD (OFF|ON)|Store(GDB|Pic) |String▶Equ(?=\\()|Tangent(?=\\()|Text(?=\\()|TextColor(?=\\()|Thick|Thin|Time|TInterval |Trace|T\\-Test |UnArchive |Un\\/d|[12]\\-Var Stats |Vertical |Web|ZBox|ZDecimal|ZFrac1/[2-58]|ZFrac1/10|ZInteger|ZInterval|Zoom In|Zoom Out|ZoomFit|ZoomRcl|ZoomStat|ZoomSto|ZPrevious|ZQuadrant1|ZSquare|ZStandard|Z\\-Test(?=\\()|ZTrig)"
85+
"match": "(Asm84CEPrgm|AUTO|AxesOff|a\\+bi|BackgroundOff|Boxplot|CLASSIC|Clear Entries|ClockO(ff|n)|Clr(AllLists|Draw|Home|Table)|CoordO(ff|n)|CubicReg|DEC|▶Dec|Degree|DependA(sk|uto)|DetectAsymO(ff|n)|DiagnosticO(ff|n)|DispGraph|DispTable|▶DMS|Dot\\-Thi(ck|n)|\\|E|Eng|ExprO(ff|n)|▶F◀▶D|Float|▶Frac|Full|Func|GarbageCollect|get(Date|Time)|get(Dt|Tm)Fmt|getKey|GridOff|G\\-T|Histogram|Horiz|IndpntAsk|IndpntAuto|isClockOn|\\|L|LabelO(ff|n)|MATHPRINT|ModBoxplot|▶n\\/d◀▶Un\\/d|Normal|NormProbPlot|Param|Pmt_(Bgn|End)|(▶)?Polar|PolarGC|Radian|rand|re\\^θi|Real|▶Rect|RectGC|Scatter|Sci|Seq|SEQ\\(n(\\+[1-2])?\\)|Sequential|Simul|STATWIZARD O(FF|N)|Thi(ck|n)|Time|Trace|tvm_(FV|I%|N|Pmt|PV)|u[vw]Axes|vwAxes|Web|xyLine|Z(Box|Decimal|Frac(1\\/([2-58]|10))|Inte(ger|rval)|Previous|Quadrant1|Square|Standard|Trig)|Zoom( In| Out|Fit|Rcl|Stat|Sto))"
7986
},
8087
{
8188
"name": "entity.name.function.8xp",
@@ -88,6 +95,26 @@
8895
"begin": "\"",
8996
"end": "\"|\n|(?=->|→)"
9097
},
98+
"constants": {
99+
"patterns": [
100+
{
101+
"name": "constant.language.8xp",
102+
"match": "(CENTER|LEFT|RIGHT)"
103+
},
104+
{
105+
"name": "constant.language.8xp",
106+
"match": "(BLUE|RED|BLACK|MAGENTA|GREEN|ORANGE|BROWN|NAVY|LTBLUE|YELLOW|WHITE|LTGRAY|MEDGRAY|GRAY|DARKGRAY)"
107+
},
108+
{
109+
"name": "constant.language.8xp",
110+
"match": "(Blue|Red|Black|Magenta|Green|Orange|Brown|Navy|LtBlue|Yellow|White|LtGray|MedGray|Gray|DarkGray)"
111+
}
112+
]
113+
},
114+
"headers": {
115+
"name": "entity.name.section.8xp",
116+
"match": "^\\:DCS(6|)$"
117+
},
91118
"variables": {
92119
"patterns": [
93120
{
@@ -96,7 +123,7 @@
96123
},
97124
{
98125
"name": "variable.parameter.8xp",
99-
"match": "([A-Zθ]|Xmin|Xmax|Xscl|Ymin|Ymax|YScl|Xres|ΔX|ΔY|XFact|YFact|TraceStep|Tmin|Tmax|Tstep|θmin|θmax|θstep|[uvw]|((?<=[uvw])\\((nMin\\)))|nMin|nMax|PlotStart|PlotStep)"
126+
"match": "(theta|Xmin|Xmax|Xscl|Ymin|Ymax|YScl|Xres|ΔX|ΔY|XFact|YFact|TraceStep|Tmin|Tmax|Tstep|θmin|θmax|θstep|[uvw]|((?<=[uvw])\\((nMin\\)))|nMin|nMax|PlotStart|PlotStep)"
100127
},
101128
{
102129
"name": "variable.parameter.8xp",
@@ -144,21 +171,9 @@
144171
}
145172
]
146173
},
147-
"constants": {
148-
"patterns": [
149-
{
150-
"name": "constant.language.8xp",
151-
"match": "(CENTER|LEFT|RIGHT)"
152-
},
153-
{
154-
"name": "constant.language.8xp",
155-
"match": "(BLUE|RED|BLACK|MAGENTA|GREEN|ORANGE|BROWN|NAVY|LTBLUE|YELLOW|WHITE|LTGRAY|MEDGRAY|GRAY|DARKGRAY)"
156-
}
157-
]
158-
},
159-
"headers": {
160-
"name": "entity.name.section.8xp",
161-
"match": "^\\:DCS(6|)$"
174+
"reals": {
175+
"name": "variable.parameter.8xp",
176+
"match": "[A-Zθ]"
162177
}
163178
},
164179
"scopeName": "source.8xp"

0 commit comments

Comments
 (0)