Push_TokenStack Subroutine

public subroutine Push_TokenStack(stack, tok)

Arguments

TypeIntentOptionalAttributesName
class(TokenStack), intent(inout) :: stack
type(Token), intent(in) :: tok

Contents

Source Code


Source Code

  subroutine Push_TokenStack(stack,tok)
    class(TokenStack),intent(inout) :: stack
    type(Token),intent(in)         :: tok

    stack%top_index = stack%top_index+1
    stack%tokens(stack%top_index)%tokenString = tok%tokenString
    stack%tokens(stack%top_index)%tokenType = tok%tokenType
    stack%tokens(stack%top_index)%tokenIndex = tok%tokenIndex
  endsubroutine Push_TokenStack