The tokens of a source text, in source order.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | n | = | 0 |
number of tokens |
|
| type(token_t), | public, | allocatable | :: | tok(:) |
storage; only |
append a token
Append token t, growing the storage as needed.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(token_list_t), | intent(inout) | :: | self |
the token list |
||
| type(token_t), | intent(in) | :: | t |
token to append |
type, public :: token_list_t !! The tokens of a source text, in source order. type(token_t), allocatable :: tok(:) !! storage; only `tok(1:n)` is in use integer :: n = 0 !! number of tokens contains procedure :: push !! append a token end type token_list_t