Class: SGF::CommentToken

Inherits:
Object
  • Object
show all
Defined in:
lib/sgf/parsing_tokens.rb

Instance Method Summary collapse

Instance Method Details

#still_inside?(char, token_so_far, sgf_stream) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/sgf/parsing_tokens.rb', line 12

def still_inside? char, token_so_far, sgf_stream
  char != "]" || (char == "]" && token_so_far[-1..-1] == "\\")
end

#transform(token) ⇒ Object



16
17
18
# File 'lib/sgf/parsing_tokens.rb', line 16

def transform token
  token.gsub "\\]", "]"
end