-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated haxeparser to support latest Haxe nightly syntax (#657)
* updated haxeparser and tokentree to support latest Haxe nightly syntax * only run tests on nightly because suffixes test fails on 4.2.5
- Loading branch information
Showing
10 changed files
with
194 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# @install: lix --silent download "gh://github.com/HaxeCheckstyle/haxeparser#1ea2a8915956ac3af6f1a11c67e0e56261b75929" into haxeparser/3.3.0/github/1ea2a8915956ac3af6f1a11c67e0e56261b75929 | ||
# @install: lix --silent download "gh://github.com/HaxeCheckstyle/haxeparser#f0a7f07101c14dc32b0964dd52af8dcaa322e178" into haxeparser/4.3.0-rc.1/github/f0a7f07101c14dc32b0964dd52af8dcaa322e178 | ||
-lib hxparse | ||
-cp ${HAXE_LIBCACHE}/haxeparser/3.3.0/github/1ea2a8915956ac3af6f1a11c67e0e56261b75929/src | ||
-D haxeparser=3.3.0 | ||
-cp ${HAXE_LIBCACHE}/haxeparser/4.3.0-rc.1/github/f0a7f07101c14dc32b0964dd52af8dcaa322e178/src | ||
-D haxeparser=4.3.0-rc.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# @install: lix --silent download "gh://github.com/Simn/hxparse#93f67419852e96daa2b81901c43a77e878c8c2bc" into hxparse/4.0.1/github/93f67419852e96daa2b81901c43a77e878c8c2bc | ||
-cp ${HAXE_LIBCACHE}/hxparse/4.0.1/github/93f67419852e96daa2b81901c43a77e878c8c2bc/src | ||
-D hxparse=4.0.1 | ||
# @install: lix --silent download "gh://github.com/simn/hxparse#32e376f80c4b0e999e9f3229947d4dac2138382b" into hxparse/4.0.1/github/32e376f80c4b0e999e9f3229947d4dac2138382b | ||
-cp ${HAXE_LIBCACHE}/hxparse/4.0.1/github/32e376f80c4b0e999e9f3229947d4dac2138382b/src | ||
-D hxparse=4.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# @install: lix --silent download "haxelib:/tokentree#1.2.1" into tokentree/1.2.1/haxelib | ||
-cp ${HAXE_LIBCACHE}/tokentree/1.2.1/haxelib/src | ||
-D tokentree=1.2.1 | ||
# @install: lix --silent download "haxelib:/tokentree#1.2.3" into tokentree/1.2.3/haxelib | ||
-cp ${HAXE_LIBCACHE}/tokentree/1.2.3/haxelib/src | ||
-D tokentree=1.2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
{} | ||
|
||
--- | ||
|
||
public function test() { | ||
// normal int | ||
eq(12_0, 120); | ||
eq(1_2_0, 120); | ||
|
||
// hex int | ||
eq(0x12_0, 0x120); | ||
eq(0x1_2_0, 0x120); | ||
|
||
// normal float | ||
feq(12.3_4, 12.34); | ||
feq(1_2.34, 12.34); | ||
feq(1_2.3_4, 12.34); | ||
|
||
// dot float | ||
feq(.3_4, .34); | ||
feq(.3_4_5, .345); | ||
|
||
// science float | ||
feq(1_2e3_4, 12e34); | ||
feq(1_2.3e4_5, 12.3e45); | ||
|
||
// int but actually float | ||
feq(1_2f64, 12f64); | ||
} | ||
|
||
public function testWithSuffix() { | ||
// normal int | ||
eq(12_0i32, 120i32); | ||
eq(1_2_0i32, 120i32); | ||
|
||
// hex int | ||
eq(0x12_0i32, 0x120i32); | ||
eq(0x1_2_0i32, 0x120i32); | ||
|
||
// normal float | ||
feq(12.3_4f64, 12.34f64); | ||
feq(1_2.34f64, 12.34f64); | ||
feq(1_2.3_4f64, 12.34f64); | ||
|
||
// dot float | ||
feq(.3_4f64, .34f64); | ||
feq(.3_4_5f64, .345f64); | ||
|
||
// science float | ||
feq(1_2e3_4f64, 12e34f64); | ||
feq(1_2.3e4_5f64, 12.3e45f64); | ||
} | ||
|
||
public function testJustBeforeSuffix() { | ||
// normal int | ||
eq(12_0_i32, 120i32); | ||
eq(1_2_0_i32, 120i32); | ||
|
||
// hex int | ||
eq(0x12_0_i32, 0x120i32); | ||
eq(0x1_2_0_i32, 0x120i32); | ||
|
||
// normal float | ||
feq(12.3_4_f64, 12.34f64); | ||
feq(1_2.34_f64, 12.34f64); | ||
feq(1_2.3_4_f64, 12.34f64); | ||
|
||
// dot float | ||
feq(.3_4_f64, .34f64); | ||
feq(.3_4_5_f64, .345f64); | ||
|
||
// science float | ||
feq(1_2e3_4_f64, 12e34f64); | ||
feq(1_2.3e4_5_f64, 12.3e45f64); | ||
|
||
feq(1_2e-3_4_f64, 12e-34f64); | ||
feq(1_2.3e-4_5_f64, 12.3e-45f64); | ||
feq(1_2e+3_4_f64, 12e+34f64); | ||
feq(1_2.3e+4_5_f64, 12.3e+45f64); | ||
|
||
feq(-1_2e-3_4_f64, -12e-34f64); | ||
feq(-1_2.3e-4_5_f64, -12.3e-45f64); | ||
feq(-1_2e+3_4_f64, -12e+34f64); | ||
feq(-1_2.3e+4_5_f64, -12.3e+45f64); | ||
} | ||
|
||
--- | ||
|
||
public function test() { | ||
// normal int | ||
eq(12_0, 120); | ||
eq(1_2_0, 120); | ||
|
||
// hex int | ||
eq(0x12_0, 0x120); | ||
eq(0x1_2_0, 0x120); | ||
|
||
// normal float | ||
feq(12.3_4, 12.34); | ||
feq(1_2.34, 12.34); | ||
feq(1_2.3_4, 12.34); | ||
|
||
// dot float | ||
feq(.3_4, .34); | ||
feq(.3_4_5, .345); | ||
|
||
// science float | ||
feq(1_2e3_4, 12e34); | ||
feq(1_2.3e4_5, 12.3e45); | ||
|
||
// int but actually float | ||
feq(1_2f64, 12f64); | ||
} | ||
|
||
public function testWithSuffix() { | ||
// normal int | ||
eq(12_0i32, 120i32); | ||
eq(1_2_0i32, 120i32); | ||
|
||
// hex int | ||
eq(0x12_0i32, 0x120i32); | ||
eq(0x1_2_0i32, 0x120i32); | ||
|
||
// normal float | ||
feq(12.3_4f64, 12.34f64); | ||
feq(1_2.34f64, 12.34f64); | ||
feq(1_2.3_4f64, 12.34f64); | ||
|
||
// dot float | ||
feq(.3_4f64, .34f64); | ||
feq(.3_4_5f64, .345f64); | ||
|
||
// science float | ||
feq(1_2e3_4f64, 12e34f64); | ||
feq(1_2.3e4_5f64, 12.3e45f64); | ||
} | ||
|
||
public function testJustBeforeSuffix() { | ||
// normal int | ||
eq(12_0i32, 120i32); | ||
eq(1_2_0i32, 120i32); | ||
|
||
// hex int | ||
eq(0x12_0i32, 0x120i32); | ||
eq(0x1_2_0i32, 0x120i32); | ||
|
||
// normal float | ||
feq(12.3_4f64, 12.34f64); | ||
feq(1_2.34f64, 12.34f64); | ||
feq(1_2.3_4f64, 12.34f64); | ||
|
||
// dot float | ||
feq(.3_4f64, .34f64); | ||
feq(.3_4_5f64, .345f64); | ||
|
||
// science float | ||
feq(1_2e3_4f64, 12e34f64); | ||
feq(1_2.3e4_5f64, 12.3e45f64); | ||
|
||
feq(1_2e-3_4f64, 12e-34f64); | ||
feq(1_2.3e-4_5f64, 12.3e-45f64); | ||
feq(1_2e+3_4f64, 12e+34f64); | ||
feq(1_2.3e+4_5f64, 12.3e+45f64); | ||
|
||
feq(-1_2e-3_4f64, -12e-34f64); | ||
feq(-1_2.3e-4_5f64, -12.3e-45f64); | ||
feq(-1_2e+3_4f64, -12e+34f64); | ||
feq(-1_2.3e+4_5f64, -12.3e+45f64); | ||
} |