swift
fc9ea1e3 - Add Lexer::IsHashbangAllowed, drop SourceManager::getHashbangBufferID (#18534)

Commit
6 years ago
Add Lexer::IsHashbangAllowed, drop SourceManager::getHashbangBufferID (#18534) Having this be a single buffer hardcoded in the SourceManager and set by all clients is silly. SourceFiles with the 'Main' kind are allowed to have hashbang lines (`#!`), other files are not. And anyone manually setting up a Lexer can decide for themselves. No intended behavioral change.
Author
Parents
  • include/swift
    • Basic
      • File
        SourceManager.h
    • Parse
      • File
        Lexer.h
  • lib
    • AST
      • File
        RawComment.cpp
    • Frontend
      • File
        Frontend.cpp
    • Parse
      • File
        Lexer.cpp
      • File
        Parser.cpp
  • tools/SourceKit/lib/SwiftLang
    • File
      SwiftEditor.cpp
    • File
      SwiftSourceDocInfo.cpp
  • unittests/Parse
    • File
      LexerTests.cpp
    • File
      LexerTriviaTests.cpp
Loading