Skip to content

Commit 383e854

Browse files
committed
updates
1 parent a2f33d5 commit 383e854

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

example/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import { Token } from '@sinclair/parsebox'
44

5-
const R = Token.Integer('0123')
5+
const R = Token.BigInt(' 123_123n hello world I am here')
66

7-
console.log(Token.Number('-.01123'))
7+
console.log(R)
88

99
// todo: comment tests
1010
// todo: Token.Integer

test/parsebox/token/span.ts

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,118 +6,118 @@ const Test = Assert.Context('Token.Span')
66
// ------------------------------------------------------------------
77
// SingleLine
88
// ------------------------------------------------------------------
9-
Test('Should SingleLine 1', () => {
9+
Test('Should Span SingleLine 1', () => {
1010
const R: [] = Token.Span(' (hel\nlo) 1', '(', ')', false)
1111
Assert.IsEqual(R, [])
1212
})
13-
Test('Should SingleLine 2', () => {
13+
Test('Should Span SingleLine 2', () => {
1414
const R: [] = Token.Span(' (\n) 1', '(', ')', false)
1515
Assert.IsEqual(R, [])
1616
})
17-
Test('Should SingleLine 3', () => {
17+
Test('Should Span SingleLine 3', () => {
1818
const R: ["()", "1"] = Token.Span('()1', '(', ')', false)
1919
Assert.IsEqual(R, ["()", "1"])
2020
})
21-
Test('Should SingleLine 4', () => {
21+
Test('Should Span SingleLine 4', () => {
2222
const R: ["()", " 1"] = Token.Span('() 1', '(', ')', false)
2323
Assert.IsEqual(R, ["()", " 1"])
2424
})
25-
Test('Should SingleLine 5', () => {
25+
Test('Should Span SingleLine 5', () => {
2626
const R: ["()", " 1"] = Token.Span(' () 1', '(', ')', false)
2727
Assert.IsEqual(R, ["()", " 1"])
2828
})
29-
Test('Should SingleLine 6', () => {
29+
Test('Should Span SingleLine 6', () => {
3030
const R: ["(hello)", ""] = Token.Span('(hello)', '(', ')', false)
3131
Assert.IsEqual(R, ["(hello)", ""])
3232
})
33-
Test('Should SingleLine 7', () => {
33+
Test('Should Span SingleLine 7', () => {
3434
const R: ["(hello)", ""] = Token.Span(' (hello)', '(', ')', false)
3535
Assert.IsEqual(R, ["(hello)", ""])
3636
})
37-
Test('Should SingleLine 8', () => {
37+
Test('Should Span SingleLine 8', () => {
3838
const R: ["(hello)", ""] = Token.Span(' (hello)', '(', ')', false)
3939
Assert.IsEqual(R, ["(hello)", ""])
4040
})
41-
Test('Should SingleLine 9', () => {
41+
Test('Should Span SingleLine 9', () => {
4242
const R: [] = Token.Span(' 1(hello)', '(', ')', false)
4343
Assert.IsEqual(R, [])
4444
})
45-
Test('Should SingleLine 10', () => {
45+
Test('Should Span SingleLine 10', () => {
4646
const R: ["(hello)", "1"] = Token.Span(' (hello)1', '(', ')', false)
4747
Assert.IsEqual(R, ["(hello)", "1"])
4848
})
49-
Test('Should SingleLine 11', () => {
49+
Test('Should Span SingleLine 11', () => {
5050
const R: ["(hello)", " 1"] = Token.Span(' (hello) 1', '(', ')', false)
5151
Assert.IsEqual(R, ["(hello)", " 1"])
5252
})
53-
Test('Should SingleLine 12', () => {
53+
Test('Should Span SingleLine 12', () => {
5454
const R: ["((hello))", ""] = Token.Span('((hello))', '((', '))', false)
5555
Assert.IsEqual(R, ["((hello))", ""])
5656
})
57-
Test('Should SingleLine 13', () => {
57+
Test('Should Span SingleLine 13', () => {
5858
const R: ["((hello))", "1"] = Token.Span('((hello))1', '((', '))', false)
5959
Assert.IsEqual(R, ["((hello))", "1"])
6060
})
61-
Test('Should SingleLine 14', () => {
61+
Test('Should Span SingleLine 14', () => {
6262
const R: ["((hello))", " 1"] = Token.Span('((hello)) 1', '((', '))', false)
6363
Assert.IsEqual(R, ["((hello))", " 1"])
6464
})
6565
// ------------------------------------------------------------------
6666
// MultiLine
6767
// ------------------------------------------------------------------
68-
Test('Should MultiLine 1', () => {
68+
Test('Should Span MultiLine 1', () => {
6969
const R: ["(hel\nlo)", " 1"] = Token.Span(' (hel\nlo) 1', '(', ')', true)
7070
Assert.IsEqual(R, ["(hel\nlo)", " 1"])
7171
})
72-
Test('Should MultiLine 2', () => {
72+
Test('Should Span MultiLine 2', () => {
7373
const R: ["(\n)", " 1"] = Token.Span(' (\n) 1', '(', ')', true)
7474
Assert.IsEqual(R, ["(\n)", " 1"])
7575
})
76-
Test('Should MultiLine 3', () => {
76+
Test('Should Span MultiLine 3', () => {
7777
const R: ["()", "1"] = Token.Span('()1', '(', ')', true)
7878
Assert.IsEqual(R, ["()", "1"])
7979
})
80-
Test('Should MultiLine 4', () => {
80+
Test('Should Span MultiLine 4', () => {
8181
const R: ["()", " 1"] = Token.Span('() 1', '(', ')', true)
8282
Assert.IsEqual(R, ["()", " 1"])
8383
})
84-
Test('Should MultiLine 5', () => {
84+
Test('Should Span MultiLine 5', () => {
8585
const R: ["()", " 1"] = Token.Span(' () 1', '(', ')', true)
8686
Assert.IsEqual(R, ["()", " 1"])
8787
})
88-
Test('Should MultiLine 6', () => {
88+
Test('Should Span MultiLine 6', () => {
8989
const R: ["(hello)", ""] = Token.Span('(hello)', '(', ')', true)
9090
Assert.IsEqual(R, ["(hello)", ""])
9191
})
92-
Test('Should MultiLine 7', () => {
92+
Test('Should Span MultiLine 7', () => {
9393
const R: ["(hello)", ""] = Token.Span(' (hello)', '(', ')', true)
9494
Assert.IsEqual(R, ["(hello)", ""])
9595
})
96-
Test('Should MultiLine 8', () => {
96+
Test('Should Span MultiLine 8', () => {
9797
const R: ["(hello)", ""] = Token.Span(' (hello)', '(', ')', true)
9898
Assert.IsEqual(R, ["(hello)", ""])
9999
})
100-
Test('Should MultiLine 9', () => {
100+
Test('Should Span MultiLine 9', () => {
101101
const R: [] = Token.Span(' 1(hello)', '(', ')', true)
102102
Assert.IsEqual(R, [])
103103
})
104-
Test('Should MultiLine 10', () => {
104+
Test('Should Span MultiLine 10', () => {
105105
const R: ["(hello)", "1"] = Token.Span(' (hello)1', '(', ')', true)
106106
Assert.IsEqual(R, ["(hello)", "1"])
107107
})
108-
Test('Should MultiLine 11', () => {
108+
Test('Should Span MultiLine 11', () => {
109109
const R: ["(hello)", " 1"] = Token.Span(' (hello) 1', '(', ')', true)
110110
Assert.IsEqual(R, ["(hello)", " 1"])
111111
})
112-
Test('Should MultiLine 12', () => {
112+
Test('Should Span MultiLine 12', () => {
113113
const R: ["((hello))", ""] = Token.Span('((hello))', '((', '))', true)
114114
Assert.IsEqual(R, ["((hello))", ""])
115115
})
116-
Test('Should MultiLine 13', () => {
116+
Test('Should Span MultiLine 13', () => {
117117
const R: ["((hello))", "1"] = Token.Span('((hello))1', '((', '))', true)
118118
Assert.IsEqual(R, ["((hello))", "1"])
119119
})
120-
Test('Should MultiLine 14', () => {
120+
Test('Should Span MultiLine 14', () => {
121121
const R: ["((hello))", " 1"] = Token.Span('((hello)) 1', '((', '))', true)
122122
Assert.IsEqual(R, ["((hello))", " 1"])
123123
})

0 commit comments

Comments
 (0)