class_docstr: For Haxe source code (http://haxe.org/).
  
  .. versionadded:: 1.3
code: def preproc_callback(self, match, ctx):
      proc = match.group(2)
  
      if proc == "if":
          # store the current stack
          self.preproc_stack.append(ctx.stack[:])
      elif proc in ["else", "elseif"]:
          # restore the stack back to right before #if
          if self.preproc_stack:
              ctx.stack = self.preproc_stack[-1][:]
      elif proc == "end":
          # remove the saved stack of previous #if
          if self.preproc_stack:
              self.preproc_stack.pop()
  
      # #if and #elseif should follow by an expr
      if proc in ["if", "elseif"]:
          ctx.stack.append("preproc-expr")
  
      # #error can be optionally follow by the error msg
      if proc in ["error"]:
          ctx.stack.append("preproc-error")
  
      yield match.start(), Comment.Preproc, "#" + proc
      ctx.pos = match.end()
  
file_path: wandb/wandb/vendor/pygments/lexers/haxe.py
imports: import re
  from pygments.lexer import ExtendedRegexLexer, RegexLexer, include, bygroups, default
  from pygments.token import Text, Comment, Operator, Keyword, Name, String, Number, Punctuation, Generic, Whitespace
label_desc: Use image node_id 1 for calling the HaxeLexer obj's underlying member method code with example usage: obj.preproc_callback(match, ctx) without return types