class_docstr: A Lexer that follows include statements.
  
  The OpenType feature file specification states that due to
  historical reasons, relative imports should be resolved in this
  order:
  
  1. If the source font is UFO format, then relative to the UFO's
     font directory
  2. relative to the top-level include file
  3. relative to the parent include file
  
  We only support 1 (via includeDir) and 2.
class_docstr_tok: ["A","Lexer","that","follows","include","statements",".","The","OpenType","feature","file","specification","states","that","due","to","historical","reasons",",","relative","imports","should","be","resolved","in","this","order",":","1",".","If","the","source","font","is","UFO","format",",","then","relative","to","the","UFO's","font","directory","2.","relative","to","the","top-level","include","file","3.","relative","to","the","parent","include","file","We","only","support","1","(","via","includeDir",")","and","2","."]
docstr: Initializes an IncludingLexer.
  
  Behavior:
      If includeDir is passed, it will be used to determine the top-level
      include directory to use for all encountered include statements. If it is
      not passed, ``os.path.dirname(featurefile)`` will be considered the
      include directory.
docstr_tok: ["Initializes","an","IncludingLexer",".","Behavior",":","If","includeDir","is","passed",",","it","will","be","used","to","determine","the","top-level","include","directory","to","use","for","all","encountered","include","statements",".","If","it","is","not","passed",",","``","os.path.dirname","(","featurefile",")","``","will","be","considered","the","include","directory","."]
code: def __init__(self, featurefile, *, includeDir=None):
      """Initializes an IncludingLexer.
  
      Behavior:
          If includeDir is passed, it will be used to determine the top-level
          include directory to use for all encountered include statements. If it is
          not passed, ``os.path.dirname(featurefile)`` will be considered the
          include directory.
      """
  
      self.lexers_ = [self.make_lexer_(featurefile)]
      self.featurefilepath = self.lexers_[0].filename_
      self.includeDir = includeDir
  
imports: from fontTools.feaLib.error import FeatureLibError, IncludedFeaNotFound
  from fontTools.feaLib.location import FeatureLibLocation
  import re
  import os
label_desc: Use image node_id 1 to create a new IncludingLexer object from inherited base classes: object with example: obj = IncludingLexer(featurefile)