Added constants for LBRACKET and RBRACKET
This commit is contained in:
4
misc.go
4
misc.go
@@ -8,13 +8,15 @@ import (
|
|||||||
var whitespaceChars = []rune{' ', '\t', '\n'}
|
var whitespaceChars = []rune{' ', '\t', '\n'}
|
||||||
var digitChars = []rune{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}
|
var digitChars = []rune{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}
|
||||||
var wordChars = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_")
|
var wordChars = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_")
|
||||||
|
var LBRACKET rune = 0xF0000
|
||||||
|
var RBRACKET rune = 0xF0001
|
||||||
|
|
||||||
func dotChars() []rune { // Returns all possible characters represented by the dot metacharacter - this is too tedious to define as a variable, which is why it is a function
|
func dotChars() []rune { // Returns all possible characters represented by the dot metacharacter - this is too tedious to define as a variable, which is why it is a function
|
||||||
start := 0x0020
|
start := 0x0020
|
||||||
end := 0x007E
|
end := 0x007E
|
||||||
to_return := make([]rune, (end-start)+1)
|
to_return := make([]rune, (end-start)+1)
|
||||||
for i := start; i <= end; i++ {
|
for i := start; i <= end; i++ {
|
||||||
to_return = append(to_return, rune(i))
|
to_return[i-start] = rune(i)
|
||||||
}
|
}
|
||||||
return to_return
|
return to_return
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user