TokenCase#

Qualified name: makros.macro\_creation.TokenCase

class makros.macro_creation.TokenCase#

Bases: object

Used to check if a token matches specific details

Methods

check

Checks a specific token against the information provided here

string

Specifies a string to be checked against to see if it matches

type

Specifies the token type to check against

check(token: TokenInfo) bool#

Checks a specific token against the information provided here

Args:

token (tokenize.TokenInfo): The token to check against

Returns:

bool: If it matches or not

string(new_str: str)#

Specifies a string to be checked against to see if it matches

Args:

new_str (str): The string to check against

Returns:

TokenCase: This TokenCase instance, used for chaining

type(new_type: int)#

Specifies the token type to check against

Args:

new_type (int): The token type to check against

Returns:

TokenCase: This TokenCase instance, used for checking