|
| 1 | +// SYNTAX TEST "Packages/Tact/package/Tact.tmLanguage" |
| 2 | + |
| 3 | +asm fun empty() { } |
| 4 | +// <- entity.other.attribute-name.tact |
| 5 | +// ^^^ keyword.other.function.tact |
| 6 | +// ^^^^^ entity.name.function.tact |
| 7 | +// ^ punctuation.brackets.round.tact |
| 8 | +// ^ punctuation.brackets.round.tact |
| 9 | +// ^ punctuation.brackets.curly.tact |
| 10 | +// ^ punctuation.brackets.curly.tact |
| 11 | + |
| 12 | +asm() fun empty2() { } |
| 13 | +// <- entity.other.attribute-name.tact |
| 14 | +// ^^ punctuation.brackets.round.tact |
| 15 | + |
| 16 | +asm(-> 000) fun rets(): Int { } |
| 17 | +// <- entity.other.attribute-name.tact |
| 18 | +// ^ punctuation.brackets.round.tact |
| 19 | +// ^^ keyword.operator.mapsto.tact |
| 20 | +// ^^^ constant.numeric.decimal.tact |
| 21 | +// ^ punctuation.brackets.round.tact |
| 22 | + |
| 23 | +asm(arg1 arg2 -> 0) fun args(arg1: Int, arg2: Int): Int { } |
| 24 | +// <- entity.other.attribute-name.tact |
| 25 | +// ^ punctuation.brackets.round.tact |
| 26 | +// ^^^^ variable.other.tact |
| 27 | +// ^^^^ variable.other.tact |
| 28 | +// ^^ keyword.operator.mapsto.tact |
| 29 | +// ^ constant.numeric.decimal.tact |
| 30 | +// ^ punctuation.brackets.round.tact |
| 31 | + |
| 32 | +struct Eleven { /* imagine 11 fields */ } |
| 33 | + |
| 34 | +asm(-> 1_0 9 8 7 6 5 4 3 2 1 0) extends fun eleven(self: Int): Eleven { INSTRUCTION INSTRUCTION 000 } |
| 35 | +// <- entity.other.attribute-name.tact |
| 36 | +// ^ punctuation.brackets.round.tact |
| 37 | +// ^^ keyword.operator.mapsto.tact |
| 38 | +// ^^^ constant.numeric.decimal.tact |
| 39 | +// ^ constant.numeric.decimal.tact |
| 40 | +// ^ constant.numeric.decimal.tact |
| 41 | +// ^ constant.numeric.decimal.tact |
| 42 | +// ^ constant.numeric.decimal.tact |
| 43 | +// ^ constant.numeric.decimal.tact |
| 44 | +// ^ constant.numeric.decimal.tact |
| 45 | +// ^ constant.numeric.decimal.tact |
| 46 | +// ^ constant.numeric.decimal.tact |
| 47 | +// ^ constant.numeric.decimal.tact |
| 48 | +// ^ constant.numeric.decimal.tact |
| 49 | +// ^ punctuation.brackets.round.tact |
| 50 | +// ^^^^^^^ keyword.other.attribute.tact |
| 51 | +// ^^^ keyword.other.function.tact |
| 52 | +// ^^^^^^ entity.name.function.tact |
| 53 | +// ^ punctuation.brackets.round.tact |
| 54 | +// ^^^^ variable.language.this.tact |
| 55 | +// ^ punctuation.colon.tact |
| 56 | +// ^^^ entity.name.type.tact |
| 57 | +// ^ punctuation.brackets.round.tact |
| 58 | +// ^ punctuation.colon.tact |
| 59 | +// ^^^^^^ entity.name.type.tact |
| 60 | +// ^ punctuation.brackets.curly.tact |
| 61 | +// ^^^^^^^^^^^ constant.other.caps.tact |
| 62 | +// ^^^^^^^^^^^ constant.other.caps.tact |
| 63 | +// ^^^ constant.numeric.decimal.tact |
| 64 | +// ^ punctuation.brackets.curly.tact |
| 65 | + |
| 66 | +asm fun isIntAnInt(x: Int): Bool { |
| 67 | + <{ |
| 68 | + TRY:<{ |
| 69 | + 0 PUSHINT ADD DROP -1 PUSHINT |
| 70 | + // <- constant.numeric.decimal.tact |
| 71 | + //^^^^^^^ constant.other.caps.tact |
| 72 | + // ^^^ constant.other.caps.tact |
| 73 | + // ^^^^ constant.other.caps.tact |
| 74 | + // ^ keyword.operator.arithmetic.tact |
| 75 | + // ^ constant.numeric.decimal.tact |
| 76 | + // ^^^^^^^ constant.other.caps.tact |
| 77 | + }>CATCH<{ |
| 78 | + 2DROP 0 PUSHINT |
| 79 | + // ^ constant.numeric.decimal.tact |
| 80 | + // ^^^^^^^ constant.other.caps.tact |
| 81 | + }> |
| 82 | + }>CONT 1 1 CALLXARGS |
| 83 | + // ^ constant.numeric.decimal.tact |
| 84 | + // ^ constant.numeric.decimal.tact |
| 85 | + // ^^^^^^^^^ constant.other.caps.tact |
| 86 | +} |
0 commit comments