Interface IScanner


public interface IScanner
Interface between the parser and the preprocessor.
Restriction:
This interface is not intended to be implemented by clients.
Restriction:
This interface is not intended to be extended by clients.
  • Method Details

    • getMacroDefinitions

      Map<String,IMacroBinding> getMacroDefinitions()
      Returns a map from String to IMacroBinding containing all the definitions that are defined at the current point in the process of scanning.
    • nextToken

      IToken nextToken() throws EndOfFileException
      Returns next token for the parser. String literals are concatenated.
      Throws:
      EndOfFileException - when the end of the translation unit has been reached.
      OffsetLimitReachedException - see Lexer.
    • isOnTopContext

      boolean isOnTopContext()
      Returns true, whenever we are processing the outermost file of the translation unit.
    • cancel

      void cancel()
      Attempts to cancel the scanner.
    • getLocationResolver

      org.eclipse.cdt.internal.core.parser.scanner.ILocationResolver getLocationResolver()
      Returns the location resolver associated with this scanner.
      Restriction:
      This method is not intended to be referenced by clients.
    • setContentAssistMode

      void setContentAssistMode(int offset)
      Puts the scanner into content assist mode.
      Restriction:
      This method is not intended to be referenced by clients.
    • setSplitShiftROperator

      void setSplitShiftROperator(boolean val)
      Instructs the scanner to split tokens of kind IToken.tSHIFTR into two tokens of kind IToken.tGT_in_SHIFTR.
      Restriction:
      This method is not intended to be referenced by clients.
    • setComputeImageLocations

      void setComputeImageLocations(boolean val)
      Turns on/off creation of image locations.
      Since:
      5.0
      See Also:
      Restriction:
      This method is not intended to be referenced by clients.
    • setTrackIncludeExport

      void setTrackIncludeExport(IncludeExportPatterns patterns)
      Turns on/off tracking if exported included files.
      Parameters:
      patterns - if not null, include export tracking is enabled, otherwise it is disabled
      Since:
      5.5
      See Also:
      Restriction:
      This method is not intended to be referenced by clients.
    • setProcessInactiveCode

      void setProcessInactiveCode(boolean val)
      Toggles generation of tokens for inactive code branches. When turned on, each inactive code branch is preceded by a token of kind IToken.tINACTIVE_CODE_START and succeeded by one of kind IToken.tINACTIVE_CODE_END.
      Restriction:
      This method is not intended to be referenced by clients.
    • skipInactiveCode

      void skipInactiveCode() throws OffsetLimitReachedException
      When in inactive code, skips all tokens up to the end of the inactive code section.

      Note, token after calling this method may be another token of type IToken.tINACTIVE_CODE_START.

      Throws:
      OffsetLimitReachedException
      Restriction:
      This method is not intended to be referenced by clients.
    • getCodeBranchNesting

      int getCodeBranchNesting()
      Returns the current nesting in code branches.
      See Also:
      Restriction:
      This method is not intended to be referenced by clients.
    • getAdditionalNumericLiteralSuffixes

      char[] getAdditionalNumericLiteralSuffixes()
      Returns a list of additional (compiler specific) suffixes which can be placed on numbers. e.g. 'u' 'l' -> 1l or 1u.
      Restriction:
      This method is not intended to be referenced by clients.
    • setScanComments

      @Deprecated default void setScanComments(boolean val)
      Deprecated.
      Has no effect.
      Restriction:
      This method is not intended to be referenced by clients.