This website requires JavaScript.
Explore
Help
Sign in
external
/
ton
Watch
1
Star
0
Fork
You've already forked ton
0
mirror of
https://github.com/ton-blockchain/ton
synced
2025-02-12 19:22:37 +00:00
Code
Issues
Releases
Wiki
Activity
master
ton
/
tolk-tester
/
tests
/
invalid-declaration-4.tolk
9 lines
93 B
Text
Raw
Permalink
Normal View
History
Unescape
Escape
[Tolk] v0.6 syntax: `fun`, `import`, `var`, types on the right, etc. Lots of changes, actually. Most noticeable are: - traditional //comments - #include -> import - a rule "import what you use" - ~ found -> !found (for -1/0) - null() -> null - is_null?(v) -> v == null - throw is a keyword - catch with swapped arguments - throw_if, throw_unless -> assert - do until -> do while - elseif -> else if - drop ifnot, elseifnot - drop rarely used operators A testing framework also appears here. All tests existed earlier, but due to significant syntax changes, their history is useless.
2024-10-31 07:11:41 +00:00
fun main() {
int x = 0;
}
/**
@compilation_should_fail
[Tolk] Allow `cell` and `slice` be valid identifiers They are not keywords anymore. > var cell = ...; > var cell: cell = ...; Motivation: in the future, when structures are implemented, this obviously should be valid: > struct a { ... } > var a = ...; Struct fields will also be allowed to have names int/slice/cell.
2025-01-27 07:33:24 +00:00
@stderr expected `;`, got `x`
[Tolk] v0.6 syntax: `fun`, `import`, `var`, types on the right, etc. Lots of changes, actually. Most noticeable are: - traditional //comments - #include -> import - a rule "import what you use" - ~ found -> !found (for -1/0) - null() -> null - is_null?(v) -> v == null - throw is a keyword - catch with swapped arguments - throw_if, throw_unless -> assert - do until -> do while - elseif -> else if - drop ifnot, elseifnot - drop rarely used operators A testing framework also appears here. All tests existed earlier, but due to significant syntax changes, their history is useless.
2024-10-31 07:11:41 +00:00
*/
Reference in a new issue
Copy permalink