node/lib/metasm/metasm/parse_c.rb
def macro_numeric(m)
			d = @lexer.definition[m]
			return if not d.kind_of? Preprocessor::Macro or d.args or d.varargs
			# filter metasm-defined vars (eg __PE__ / _M_IX86)
			return if not d.name or not bt = d.name.backtrace or (bt[0][0] != ?" and bt[0][0] != ?<)
			raise 'cannot macro_numeric with unparsed data' if not eos?
			@lexer.feed m
			if e = CExpression.parse(self, Block.new(@toplevel)) and eos?
				v = e.reduce(self)
				return v if v.kind_of? ::Numeric
			end
			readtok until eos?
			nil
		rescue ParseError
			readtok until eos?
			nil
		end
# check if a macro definition has a numeric value
# returns this value or nil
check if a macro definition has a numeric value
returns this value or nil
check if a macro definition has a numeric value returns this value or nil
def macro_numeric(m)
			d = @lexer.definition[m]
			return if not d.kind_of? Preprocessor::Macro or d.args or d.varargs
			return if not d.name or not bt = d.name.backtrace or (bt[0][0] != ?" and bt[0][0] != ?<)
			raise 'cannot macro_numeric with unparsed data' if not eos?
			@lexer.feed m
			if e = CExpression.parse(self, Block.new(@toplevel)) and eos?
				v = e.reduce(self)
				return v if v.kind_of? ::Numeric
			end
			readtok until eos?
			nil
		rescue ParseError
			readtok until eos?
			nil
		end
def macro_numeric ( m ) d = @lexer . definition [ m ] return if not d . kind_of? Preprocessor :: Macro or d . args or d . varargs return if not d . name or not bt = d . name . backtrace or ( bt [ 0 ] [ 0 ] != ?" and bt [ 0 ] [ 0 ] != ?< ) raise 'cannot macro_numeric with unparsed data' if not eos? @lexer . feed m if e = CExpression . parse ( self , Block . new ( @toplevel ) ) and eos? v = e . reduce ( self ) return v if v . kind_of? :: Numeric end readtok until eos? nil rescue ParseError readtok until eos? nil end
check if a macro definition has a numeric value
returns this value or nil
check if a macro definition has a numeric value returns this value or nil
# filter metasm-defined vars (eg __PE__ / _M_IX86)
m