Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(TokenStack), | intent(inout) | :: | stack | |||
type(Token), | intent(in) | :: | tok |
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