Logo
Explore Help
Register Sign In
zaphar/ucg
1
0
Fork 0
You've already forked ucg
mirror of https://github.com/zaphar/ucg.git synced 2025-07-22 18:19:54 -04:00
Code Issues Packages Projects Releases Wiki Activity
ucg/integration_tests/operator_precedence_test.ucg

42 lines
482 B
Plaintext
Raw Normal View History

FEATURE: Better error reporting. Slight change to how assert works to support this. We no longer automatically add a semicolon to the expressions we require the user to right them. This updates the docs to illustrate that and reformats our integration test suite for this and readability.
2018-11-06 19:40:56 -06:00
assert |
2 * 2 + 1 == 5;
|;
assert |
2 + 2 * 3 == 8;
|;
assert |
2 * (2 + 1) == 6;
|;
assert |
2 * 2 + 1 > 4;
|;
assert |
2 * 2 + 1 < 6;
|;
assert |
2 * 2 + 1 >= 5;
|;
assert |
2 * 2 + 1 <= 5;
|;
assert |
2 / 2 == 1;
|;
assert |
2 - 1 == 1;
FEATURE: evaluate dot selectors as a binary operator now. Also fixed a precedence bug in our parser.
2018-12-28 21:56:11 -06:00
|;
assert |
1 + 1 + 1 + 1 == 4;
|;
assert |
1 + 1 + 2 * 2 + 1 + 1 == 1 + 1 + (2 * 2) + 1 + 1;
|;
let tpl = {
one = {
two = 12,
},
};
assert |
1 + tpl.one.two * 2 + 3 == 28;
FEATURE: Better error reporting. Slight change to how assert works to support this. We no longer automatically add a semicolon to the expressions we require the user to right them. This updates the docs to illustrate that and reformats our integration test suite for this and readability.
2018-11-06 19:40:56 -06:00
|;
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 171ms Template: 16ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API