module Rucc::Lexer::Preprocessor::Pragma
Private Instance Methods
parse_pragma_operand(tok)
click to toggle source
@param [Token] tok
# File lib/rucc/lexer/preprocessor/pragma.rb, line 9 def parse_pragma_operand(tok) s = tok.sval case s when "once" path = File.expand_path(tok.file.name) @once[path] = 1 when "enable_warning" @enable_warning = true when "disable_warning" @enable_warning = false else Util.errort!(tok, "unknown #pragma: #{s}") end end
read_pragma()
click to toggle source
# File lib/rucc/lexer/preprocessor/pragma.rb, line 24 def read_pragma tok = read_ident parse_pragma_operand(tok) end