non-concurrent, test cases back to expected state
parent
b9e1bab075
commit
0c7b00e9b5
@ -0,0 +1,15 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"code.ndumas.com/ndumas/wikilink-parser"
|
||||
)
|
||||
|
||||
func main() {
|
||||
l := wikilink.Lex("debugLexer", `[[#heading]]`)
|
||||
for _, item := range l.Items {
|
||||
item := item
|
||||
log.Printf("%#+v\n", item)
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
// Code generated by "stringer -type=ItemType"; DO NOT EDIT.
|
||||
|
||||
package wikilink
|
||||
|
||||
import "strconv"
|
||||
|
||||
func _() {
|
||||
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||
// Re-run the stringer command to generate them again.
|
||||
var x [1]struct{}
|
||||
_ = x[ItemError-0]
|
||||
_ = x[ItemEOF-1]
|
||||
_ = x[ItemIdent-2]
|
||||
_ = x[ItemOpenLink-3]
|
||||
_ = x[ItemCloseLink-4]
|
||||
_ = x[ItemHeading-5]
|
||||
_ = x[ItemBlockRef-6]
|
||||
_ = x[ItemAlias-7]
|
||||
_ = x[ItemText-8]
|
||||
}
|
||||
|
||||
const _ItemType_name = "ItemErrorItemEOFItemIdentItemOpenLinkItemCloseLinkItemHeadingItemBlockRefItemAliasItemText"
|
||||
|
||||
var _ItemType_index = [...]uint8{0, 9, 16, 25, 37, 50, 61, 73, 82, 90}
|
||||
|
||||
func (i ItemType) String() string {
|
||||
if i < 0 || i >= ItemType(len(_ItemType_index)-1) {
|
||||
return "ItemType(" + strconv.FormatInt(int64(i), 10) + ")"
|
||||
}
|
||||
return _ItemType_name[_ItemType_index[i]:_ItemType_index[i+1]]
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
// Code generated by "stringer -type=LexemeType"; DO NOT EDIT.
|
||||
|
||||
package wikilink
|
||||
|
||||
import "strconv"
|
||||
|
||||
func _() {
|
||||
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||
// Re-run the stringer command to generate them again.
|
||||
var x [1]struct{}
|
||||
_ = x[LexError-0]
|
||||
_ = x[LexEOF-1]
|
||||
_ = x[LexIdent-2]
|
||||
_ = x[LexOpenLink-3]
|
||||
_ = x[LexCloseLink-4]
|
||||
_ = x[LexHeading-5]
|
||||
_ = x[LexBlockRef-6]
|
||||
_ = x[LexAlias-7]
|
||||
_ = x[LexText-8]
|
||||
}
|
||||
|
||||
const _LexemeType_name = "LexErrorLexEOFLexIdentLexOpenLinkLexCloseLinkLexHeadingLexBlockRefLexAliasLexText"
|
||||
|
||||
var _LexemeType_index = [...]uint8{0, 8, 14, 22, 33, 45, 55, 66, 74, 81}
|
||||
|
||||
func (i LexemeType) String() string {
|
||||
if i < 0 || i >= LexemeType(len(_LexemeType_index)-1) {
|
||||
return "LexemeType(" + strconv.FormatInt(int64(i), 10) + ")"
|
||||
}
|
||||
return _LexemeType_name[_LexemeType_index[i]:_LexemeType_index[i+1]]
|
||||
}
|
Loading…
Reference in New Issue