Changeset 291142 in webkit for trunk/Source/JavaScriptCore/offlineasm/parser.rb
- Timestamp:
- Mar 10, 2022, 6:35:06 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/offlineasm/parser.rb
r290990 r291142 261 261 262 262 class Parser 263 def initialize(data, fileName, options )263 def initialize(data, fileName, options, sources=nil) 264 264 @tokens = lex(data, fileName) 265 265 @idx = 0 … … 269 269 @buildProductsDirectory = ENV['BUILT_PRODUCTS_DIR']; 270 270 @options = options 271 @sources = sources 271 272 end 272 273 … … 844 845 fileExists = File.exists?(fileName) 845 846 raise "File not found: #{fileName}" if not fileExists and not isOptional 846 list << parse(fileName, @options ) if fileExists847 list << parse(fileName, @options, @sources) if fileExists 847 848 else 848 849 parseError "Expecting terminal #{final} #{comment}" … … 901 902 end 902 903 903 def parseData(data, fileName, options )904 parser = Parser.new(data, SourceFile.new(fileName), options )904 def parseData(data, fileName, options, sources) 905 parser = Parser.new(data, SourceFile.new(fileName), options, sources) 905 906 parser.parseSequence(nil, "") 906 907 end 907 908 908 def parse(fileName, options) 909 parseData(readTextFile(fileName), fileName, options) 909 def parse(fileName, options, sources=nil) 910 sources << fileName if sources 911 parseData(readTextFile(fileName), fileName, options, sources) 910 912 end 911 913
Note:
See TracChangeset
for help on using the changeset viewer.