qasm-ts - v2.0.0
    Preparing search index...

    Function notParam

    • Determines whether a token can be used as a parameter in expressions.

      This function helps the parser validate parameter lists by checking if a token type is allowed in parameter contexts. Parameters can include identifiers, numbers, and other value-bearing tokens, but not structural tokens like semicolons or braces.

      Parameters

      • token: Token

        The token type to check

      Returns boolean

      true if the token CANNOT be used as a parameter, false otherwise

      notParam(Token.Id);         // false - identifiers can be parameters
      notParam(Token.NNInteger); // false - numbers can be parameters
      notParam(Token.Semicolon); // true - semicolons cannot be parameters
      notParam(Token.LParen); // true - parentheses cannot be parameters