tree-sitter-hy/test/corpus/numeric.txt
2025-04-18 15:35:24 -05:00

268 lines
2.2 KiB
Text

=======
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))