1 | Expression Language and Assignments
|
2 |
|
3 | [Assign Ops] = += -= *= /= **= //= %=
|
4 | &= |= ^= <<= >>=
|
5 | [Literals] bool-literal true false null
|
6 | int-literal 42 65_536 0xFF 0o755 0b10
|
7 | float-lit 3.14 1.5e-10
|
8 | X num-suffix 42 K Ki M Mi G Gi T Ti / ms us
|
9 | rune-literal #'a' #'_' \n \\ \u{3bc}
|
10 | ysh-string "$x" r'[a-z]\n' u'line\n' b'byte \yff'
|
11 | triple-quoted """ r''' u''' b'''
|
12 | str-template ^"$a and $b" for Str::replace()
|
13 | list-literal ['one', 'two', 3] :| unquoted words |
|
14 | dict-literal {name: 'bob'}
|
15 | range 1 .. n+1
|
16 | block-literal ^(echo $PWD)
|
17 | expr-lit ^[1 + 2*3]
|
18 | X to-string $[myobj]
|
19 | X to-array @[myobj]
|
20 | [Operators] concat s1 ++ s2, L1 ++ L2
|
21 | ysh-equals === !== ~== is, is not, in, not in
|
22 | ysh-compare < <= > >= (numbers only)
|
23 | ysh-logical not and or
|
24 | ysh-arith + - * / // % **
|
25 | ysh-bitwise ~ & | ^ << >>
|
26 | ysh-ternary '+' if x >= 0 else '-'
|
27 | ysh-index a[3] s[3]
|
28 | ysh-attr mydict.key
|
29 | ysh-slice a[1:-1] s[1:-1]
|
30 | func-call f(x, y)
|
31 | thin-arrow mylist->pop()
|
32 | fat-arrow mystr => startsWith('prefix')
|
33 | match-ops ~ !~ ~~ !~~
|
34 | [Eggex] re-literal / d+ ; re-flags ; ERE /
|
35 | re-primitive %zero 'sq'
|
36 | class-literal [c a-z 'abc' @str_var \\ \xFF \u0100]
|
37 | named-class dot digit space word d s w
|
38 | re-repeat d? d* d+ d{3} d{2,4}
|
39 | re-compound seq1 seq2 alt1|alt2 (expr1 expr2)
|
40 | re-capture <capture d+ as name: int>
|
41 | re-splice Subpattern @subpattern
|
42 | re-flags reg_icase reg_newline
|
43 | X re-multiline ///
|