mirror of
https://github.com/elladunbar/tree-sitter-hy.git
synced 2025-11-05 14:59:55 -06:00
Basic functionality
This commit is contained in:
parent
a0e03ddd73
commit
8cd6c4e65d
14 changed files with 9100 additions and 3 deletions
268
test/corpus/numeric.txt
Normal file
268
test/corpus/numeric.txt
Normal file
|
|
@ -0,0 +1,268 @@
|
|||
=======
|
||||
integer
|
||||
=======
|
||||
|
||||
7
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(integer))
|
||||
|
||||
============
|
||||
integer long
|
||||
============
|
||||
|
||||
2147483647
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(integer))
|
||||
|
||||
==================
|
||||
integer super long
|
||||
==================
|
||||
|
||||
79228162514264337593543950336
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(integer))
|
||||
|
||||
==================
|
||||
integer zero start
|
||||
==================
|
||||
|
||||
00000042
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(integer))
|
||||
|
||||
========================
|
||||
integer should be symbol
|
||||
========================
|
||||
|
||||
_1
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(symbol))
|
||||
|
||||
==============
|
||||
integer signed
|
||||
==============
|
||||
|
||||
-7
|
||||
+7
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(integer) (integer))
|
||||
|
||||
==============
|
||||
integer with _
|
||||
==============
|
||||
|
||||
100_000_000__000
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(integer))
|
||||
|
||||
==============
|
||||
integer with ,
|
||||
==============
|
||||
|
||||
10,000,000,000
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(integer))
|
||||
|
||||
=============
|
||||
integer octal
|
||||
=============
|
||||
|
||||
0o177
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(integer))
|
||||
|
||||
==============
|
||||
integer binary
|
||||
==============
|
||||
|
||||
0b_1110_0101
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(integer))
|
||||
|
||||
===========
|
||||
integer hex
|
||||
===========
|
||||
|
||||
0xdeadbeef
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(integer))
|
||||
|
||||
=====
|
||||
float
|
||||
=====
|
||||
|
||||
3.14
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(float))
|
||||
|
||||
============
|
||||
float signed
|
||||
============
|
||||
|
||||
+2.17
|
||||
-1.
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(float) (float))
|
||||
|
||||
=================
|
||||
float no fraction
|
||||
=================
|
||||
|
||||
10.
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(float))
|
||||
|
||||
===================
|
||||
float only fraction
|
||||
===================
|
||||
|
||||
.001
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(float))
|
||||
|
||||
|
||||
============
|
||||
float with _
|
||||
============
|
||||
|
||||
3.14_15_93
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(float))
|
||||
|
||||
============================
|
||||
float scientific no fraction
|
||||
============================
|
||||
|
||||
1e100
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(float))
|
||||
|
||||
==============================
|
||||
float scientific with fraction
|
||||
==============================
|
||||
|
||||
3.14e-10
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(float))
|
||||
|
||||
=======================
|
||||
float scientific zeroes
|
||||
=======================
|
||||
|
||||
0e0
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(float))
|
||||
|
||||
==============
|
||||
float literals
|
||||
==============
|
||||
|
||||
NaN
|
||||
Inf
|
||||
-Inf
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(float) (float) (float))
|
||||
|
||||
=======
|
||||
complex
|
||||
=======
|
||||
|
||||
3+4j
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(complex))
|
||||
|
||||
==============
|
||||
complex signed
|
||||
==============
|
||||
|
||||
-3+4j
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(complex))
|
||||
|
||||
==============
|
||||
complex harder
|
||||
==============
|
||||
|
||||
0+3.14e-10j
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(complex))
|
||||
|
||||
===============
|
||||
complex literal
|
||||
===============
|
||||
|
||||
-Inf+NaNj
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(complex))
|
||||
Loading…
Add table
Add a link
Reference in a new issue