CordyJ / OpenTxl

TXL programming language compiler/interpreter
Other
18 stars 1 forks source link

Compatibility of [srclinenumber] and [srcfilename] #22

Closed CordyJ closed 9 months ago

CordyJ commented 9 months ago

[srclinenumber] and [srcfilename] are very useful in reports, but using them is awkward since they aren't compatible with other token types. [srclinenumber] should deconstruct and/or interact with [number], and [srcfilename] should deconstruct and/or interact with [stringlit].

Simplest suggestion: have [+] accept them both.

CordyJ commented 9 months ago

Update: actually, both of them are compatible with [stringlit] and other token types, so there is no problem with [srcfilename]. The only problem is that [srclinenumber] acts like text, not like a number, when used with [+].