Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Remove un-used code
Browse files Browse the repository at this point in the history
  • Loading branch information
demizer committed Jun 19, 2017
1 parent f8c2bdd commit 6c51ece
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 20 deletions.
7 changes: 2 additions & 5 deletions pkg/parser/paragraph.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@ outer:

p.Msgr("Have token", "token", ci)

if ci == nil {
p.Msg("ci == nil, breaking")
break
} else if ci.Type == tok.EOF {
p.Msg("current item type == tok.EOF")
if ci == nil || ci.Type == tok.EOF {
p.Msg("current token == nil or current item type == tok.EOF")
break
} else if pi != nil && pi.Type == tok.Text && ci.Type == tok.Text {
p.Msg("Previous type == tok.Text, current type == tok.Text; Concatenating text!")
Expand Down
8 changes: 4 additions & 4 deletions pkg/token/inline_markup.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ func lexInlineMarkup(l *Lexer) stateFn {
lexInlineLiteral(l)
break
} else if l.mark == '`' {
if isInlineReference(l) {
lexInlineReference(l)
break
}
// if isInlineReference(l) {
// lexInlineReference(l)
// break
// }
lexInlineInterpretedText(l)
break
}
Expand Down
13 changes: 3 additions & 10 deletions pkg/token/lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ func (l *Lexer) emit(t Type) {

if t == BlankLine {
tok = "\n"
} else if t == Space && l.start == l.index {
// For linebreaks and vertical tabs at the end of the line in a paragraph
tok = " "
// } else if t == Space && l.start == l.index {
// // For linebreaks and vertical tabs at the end of the line in a paragraph
// tok = " "
} else if t == EOF {
tok = ""
} else {
Expand Down Expand Up @@ -233,13 +233,6 @@ func (l *Lexer) NextItem() *Item {

}

func (l *Lexer) skip(locs int) {
for x := 1; x <= locs; x++ {
l.next()
}
l.start = l.index
}

// gotoLine advances the lexer to a line and index within that line. Line numbers start at 1.
func (l *Lexer) gotoLocation(start, line int) {
l.line = line - 1
Expand Down
2 changes: 1 addition & 1 deletion pkg/token/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func lexHyperlinkTargetStart(l *Lexer) stateFn {
if l.mark != '.' {
break
}
l.next()
// l.next()
}
l.emit(HyperlinkTargetStart)
lexSpace(l)
Expand Down

0 comments on commit 6c51ece

Please sign in to comment.