Container storing tokens
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(kind=tfc, len=:), | public, | allocatable | :: | filename |
Filename of the input |
||
character(kind=tfc, len=:), | public, | allocatable | :: | source |
Actual source |
||
type(toml_token), | public, | allocatable | :: | token(:) |
Stack of stored tokens |
||
integer, | public | :: | top | = | 0 |
Last stored token |
Push a new token to the stack
Push a new token to the stack
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_context), | intent(inout) | :: | self |
Instance of the token storage |
||
type(toml_token), | intent(in) | :: | token |
New token to be added |
Create a report
Create a report with a single label
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_context), | intent(in) | :: | self |
Instance of the token storage |
||
character(kind=tfc, len=*), | intent(in) | :: | message |
Message for the report |
||
integer, | intent(in) | :: | origin |
Position to report at |
||
character(kind=tfc, len=*), | intent(in), | optional | :: | label |
String for the label |
|
integer, | intent(in), | optional | :: | level |
Highlight level |
|
type(toml_terminal), | intent(in), | optional | :: | color |
Color terminal |
Final rendered report
Create a report with two labels
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_context), | intent(in) | :: | self |
Instance of the token storage |
||
character(kind=tfc, len=*), | intent(in) | :: | message |
Message for the report |
||
integer, | intent(in) | :: | origin1 |
Position to report at |
||
integer, | intent(in) | :: | origin2 |
Position to report at |
||
character(kind=tfc, len=*), | intent(in), | optional | :: | label1 |
String for the label |
|
character(kind=tfc, len=*), | intent(in), | optional | :: | label2 |
String for the label |
|
integer, | intent(in), | optional | :: | level1 |
Highlight level |
|
integer, | intent(in), | optional | :: | level2 |
Highlight level |
|
type(toml_terminal), | intent(in), | optional | :: | color |
Color terminal |
Final rendered report
Create a report with a single label
Create a report with a single label
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_context), | intent(in) | :: | self |
Instance of the token storage |
||
character(kind=tfc, len=*), | intent(in) | :: | message |
Message for the report |
||
integer, | intent(in) | :: | origin |
Position to report at |
||
character(kind=tfc, len=*), | intent(in), | optional | :: | label |
String for the label |
|
integer, | intent(in), | optional | :: | level |
Highlight level |
|
type(toml_terminal), | intent(in), | optional | :: | color |
Color terminal |
Final rendered report
Create a report with a two labels
Create a report with two labels
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_context), | intent(in) | :: | self |
Instance of the token storage |
||
character(kind=tfc, len=*), | intent(in) | :: | message |
Message for the report |
||
integer, | intent(in) | :: | origin1 |
Position to report at |
||
integer, | intent(in) | :: | origin2 |
Position to report at |
||
character(kind=tfc, len=*), | intent(in), | optional | :: | label1 |
String for the label |
|
character(kind=tfc, len=*), | intent(in), | optional | :: | label2 |
String for the label |
|
integer, | intent(in), | optional | :: | level1 |
Highlight level |
|
integer, | intent(in), | optional | :: | level2 |
Highlight level |
|
type(toml_terminal), | intent(in), | optional | :: | color |
Color terminal |
Final rendered report
type :: toml_context !> Filename of the input character(:, tfc), allocatable :: filename !> Actual source character(:, tfc), allocatable :: source !> Stack of stored tokens type(toml_token), allocatable :: token(:) !> Last stored token integer :: top = 0 contains !> Push a new token to the stack procedure :: push_back !> Create a report generic :: report => report1, report2 !> Create a report with a single label procedure :: report1 !> Create a report with a two labels procedure :: report2 end type toml_context