Skip to content

Commit efb0347

Browse files
committed
Update help.txt
1 parent 338279a commit efb0347

File tree

1 file changed

+32
-12
lines changed

1 file changed

+32
-12
lines changed

help.txt

+32-12
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
can be: advance clean eval hide html-editor js-editor js-unit legacy math ugly wordy
2121
## -thread - disable an html-attribute via inline script
2222
can be: advance clean eval hide html-editor js-editor js-unit legacy math ugly wordy
23+
## @x - emulates that JS version: 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.8.1, 1.8.5
2324
## *a: b; - replace all $a with b (soft baste)
2425
## **a: b; - replace all $a with parsed b (hard baste)
2526

@@ -34,7 +35,8 @@
3435
a--b - a_b
3536
a#b - a[b]
3637
a#0b - a[a.length - b]
37-
@ - this
38+
@ - this or self, depending on the JS version
39+
# - this or self, depending on the JS version
3840
@a - this.a
3941
$of - typeof
4042
$del - delete
@@ -56,6 +58,7 @@ $# - Object
5658
.$val - value
5759
.$qy - querySelector
5860
.$Qy - querySelectorAll
61+
...$args - depending on the JS version, either calls on the last constructor, or does nothing
5962
a: b - if there isn't a comma after b, there will be one added, unless b is the last item
6063

6164
-- functions --
@@ -97,7 +100,7 @@ a!?? - test if a doesn't exist
97100

98101
---- "Advance thread" features ----
99102
.a - class x
100-
.a b - class a extends y
103+
.a b - class a extends b
101104
*. - super
102105
@(a, b, c) - constructor(a, b, c)
103106
b => a - const a = b
@@ -110,6 +113,7 @@ prom a - creates a promissory function (like Java's "interface", Tux "gusset");
110113
supported types: Array Boolean Function Number Object RegExp String Symbol * [any]
111114

112115
---- "Legacy thread" features ----
116+
a ~= b - a = -(a - b)
113117
a &= b - a = a && b
114118
a |= b - a = a || b
115119
a ^= b - if a != null, a = b
@@ -138,23 +142,27 @@ a[=] - a.reverse()
138142
a[^]<b> - a.sort(b)
139143
a[-] - a.pop()
140144
d[] - if d is a number, it creates a d-dimension array (Tux Array "gores"), i.e. 3[] === [[[]]] /called on as [x][y][z]/
141-
d"..." - (Tux String "gores") if d is a number, then the string will be repeated d many times
142-
d'...' - if d is a number, then the string will be repeated d many times
143-
d`...` - if d is a number, then the string will be repeated d many times
144145
r:a - if r is a reserved word, it will be double-quoted
145146
.r - if r is a reserved word, it will be double-quoted and bracketed; ["r"]
146147

147148
-- Strings --
148149
"${a}" - interpolation, ..." + a + "...
149-
'${a}' - interpolation, ...' + a + '...
150-
`${a}` - interpolation, ...` + a + `...
150+
'${a}' - interpolation, ...' + a + '...
151+
`${a}` - interpolation, ...` + a + `...
151152
"..." "..." - automatic concatination, "..." + "..."
152153
'...' '...' - automatic concatination, '...' + '...'
153154
`...` `...` - automatic concatination, `...` + `...`
155+
d * "..." - (Tux String "gores") if d is a number, then the string will be repeated d many times
156+
d * '...' - if d is a number, then the string will be repeated d many times
157+
d * `...` - if d is a number, then the string will be repeated d many times
154158

155159
-- RegExp --
160+
\a - Alpha characters, [a-zA-Z]
161+
\A - Non-alpha characters, [^a-zA-Z]
156162
\j - JS variables, [a-zA-Z\$_][\w\d\$_]*
157163
\J - non-JS variables, [^a-zA-Z\$_][\w\d\$_]*
164+
\k - lowercase, \k[A-fR-Z] = /[a-fr-z]/
165+
\K - uppercase, \K[A0fR-Z] = /[A-FR-Z]/
158166

159167
---- "Math thread" features ----
160168
a(b) = c - function a(b){ return c; }
@@ -163,9 +171,9 @@ a~b - ((a % b + b) % b)
163171
|a| - Math.abs(a)
164172
a^b - Math.pow(a, b)
165173
a**b - Math.pow(a, b)
166-
\a\ - Math.sqrt(a)
167-
a\b\ - "a" root of b, i.e. 3\x\ is the cube root of x
168-
a _ b - Math.floor(a/b) /notice the spaces/
174+
/?a/ - Math.sqrt(a)
175+
a/?b/ - "a" root of b, i.e. 3\x\ is the cube root of x
176+
a%%b - Math.floor(a/b)
169177
log a (b) - log, base a, of b /log(b) / log(a)/
170178
@.property - Math.property, i.e. @.PI = Math.PI, @.log = Math.log /notice the ./
171179

@@ -308,7 +316,8 @@ a /b/ - a(/b/)
308316

309317
---- Tuxedo Methods ----
310318
* $ means executable
311-
* ~ means above, but with different arguments
319+
* ~ means "same as above," but with different arguments
320+
* # means a property, that isn't a method
312321
* tuxedo === tux
313322
tux
314323
.get
@@ -337,4 +346,15 @@ $ .load[name] - tux.storage.get(name)
337346
$ .delete[name] - tux.storage.delete(name)
338347
$ .typeof[object] - returns the typeof "object" to a string, i.e. true === "<true>", [1, 2, 3] === "[1, 2, 3]"
339348
$ .typeOf[a, b, c] - returns a string of each arguments type
340-
********/
349+
$ .precompiled - returns an object as if a snap-shot of the data being compiled
350+
# .content - returns the actual "snap-shot"
351+
# .channels - returns the channels {no}
352+
# .comments - returns an object of the comments {plural, single}
353+
# .regexps - returns the regexps
354+
# .strings - returns an object of strings {double, grave, single}
355+
# .threads - returns an object of threads {available, disabled, enabled}
356+
$ .stamp - returns an object containing a start, stop, and difference of the TuxedoScript compile time {start, end, span}
357+
# .version - the TuxedoScript version
358+
$ .support - returns an array of all JS versions supported by the user's browser i.e. [1.1 ... 1.8.5]
359+
$ .runtime - returns the JS version that has been detected
360+
********/

0 commit comments

Comments
 (0)