Skip to main content

FortranTokenType

Enum FortranTokenType 

Source
#[repr(u8)]
pub enum FortranTokenType {
Show 171 variants Whitespace = 0, Newline = 1, Comment = 2, Identifier = 3, IntegerLiteral = 4, Number = 5, NumberLiteral = 6, RealLiteral = 7, DoublePrecisionLiteral = 8, ComplexLiteral = 9, CharacterLiteral = 10, CharLiteral = 11, String = 12, StringLiteral = 13, LogicalLiteral = 14, True = 15, False = 16, Program = 17, EndProgram = 18, Subroutine = 19, EndSubroutine = 20, Function = 21, EndFunction = 22, Module = 23, EndModule = 24, Interface = 25, EndInterface = 26, Type = 27, EndType = 28, If = 29, Then = 30, ElseIf = 31, Else = 32, EndIf = 33, Do = 34, EndDo = 35, While = 36, Select = 37, Case = 38, EndSelect = 39, Where = 40, EndWhere = 41, Forall = 42, EndForall = 43, Associate = 44, EndAssociate = 45, Block = 46, EndBlock = 47, Critical = 48, EndCritical = 49, Procedure = 50, EndProcedure = 51, Abstract = 52, Allocatable = 53, Allocate = 54, Deallocate = 55, Assignment = 56, Bind = 57, Call = 58, Class = 59, Common = 60, Contains = 61, Continue = 62, Cycle = 63, Data = 64, Default = 65, Dimension = 66, Elemental = 67, Entry = 68, Equivalence = 69, Exit = 70, External = 71, Final = 72, Format = 73, Generic = 74, Go = 75, Goto = 76, Implicit = 77, Import = 78, Include = 79, Intent = 80, Intrinsic = 81, Kind = 82, Len = 83, None = 84, Nullify = 85, Only = 86, Optional = 87, Parameter = 88, Pause = 89, Pointer = 90, Print = 91, Private = 92, Protected = 93, Public = 94, Pure = 95, Read = 96, Recursive = 97, Result = 98, Return = 99, Rewind = 100, Save = 101, Stop = 102, Target = 103, Use = 104, Value = 105, Volatile = 106, Wait = 107, Write = 108, Inquire = 109, Backspace = 110, Close = 111, Open = 112, To = 113, End = 114, Double = 115, Precision = 116, Integer = 117, Real = 118, DoublePrecision = 119, Complex = 120, Character = 121, Logical = 122, Plus = 123, Minus = 124, Star = 125, Slash = 126, StarStar = 127, Power = 128, Concatenate = 129, Equal = 130, EqualEqual = 131, NotEqual = 132, SlashEqual = 133, LessThan = 134, Less = 135, GreaterThan = 136, Greater = 137, LessEqual = 138, GreaterEqual = 139, Assign = 140, Arrow = 141, And = 142, Or = 143, Not = 144, Eqv = 145, Equivalent = 146, Neqv = 147, NotEquivalent = 148, Eq = 149, Ne = 150, Lt = 151, Le = 152, Gt = 153, Ge = 154, LeftParen = 155, RightParen = 156, LeftBracket = 157, RightBracket = 158, Comma = 159, Colon = 160, DoubleColon = 161, ColonColon = 162, Semicolon = 163, Percent = 164, Ampersand = 165, Dot = 166, Root = 167, Error = 168, Eof = 169, EndFile = 170,
}
Expand description

Token types for Fortran.

Variants§

§

Whitespace = 0

Whitespace.

§

Newline = 1

Newline.

§

Comment = 2

Comment.

§

Identifier = 3

Identifier.

§

IntegerLiteral = 4

Integer literal.

§

Number = 5

Number.

§

NumberLiteral = 6

Number literal.

§

RealLiteral = 7

Real literal.

§

DoublePrecisionLiteral = 8

Double precision literal.

§

ComplexLiteral = 9

Complex literal.

§

CharacterLiteral = 10

Character literal.

§

CharLiteral = 11

Character literal (alias).

§

String = 12

String.

§

StringLiteral = 13

String literal.

§

LogicalLiteral = 14

Logical literal.

§

True = 15

.true. literal.

§

False = 16

.false. literal.

§

Program = 17

program keyword.

§

EndProgram = 18

end program keyword.

§

Subroutine = 19

subroutine keyword.

§

EndSubroutine = 20

end subroutine keyword.

§

Function = 21

function keyword.

§

EndFunction = 22

end function keyword.

§

Module = 23

module keyword.

§

EndModule = 24

end module keyword.

§

Interface = 25

interface keyword.

§

EndInterface = 26

end interface keyword.

§

Type = 27

type keyword.

§

EndType = 28

end type keyword.

§

If = 29

if keyword.

§

Then = 30

then keyword.

§

ElseIf = 31

else if keyword.

§

Else = 32

else keyword.

§

EndIf = 33

end if keyword.

§

Do = 34

do keyword.

§

EndDo = 35

end do keyword.

§

While = 36

while keyword.

§

Select = 37

select keyword.

§

Case = 38

case keyword.

§

EndSelect = 39

end select keyword.

§

Where = 40

where keyword.

§

EndWhere = 41

end where keyword.

§

Forall = 42

forall keyword.

§

EndForall = 43

end forall keyword.

§

Associate = 44

associate keyword.

§

EndAssociate = 45

end associate keyword.

§

Block = 46

block keyword.

§

EndBlock = 47

end block keyword.

§

Critical = 48

critical keyword.

§

EndCritical = 49

end critical keyword.

§

Procedure = 50

procedure keyword.

§

EndProcedure = 51

end procedure keyword.

§

Abstract = 52

abstract keyword.

§

Allocatable = 53

allocatable keyword.

§

Allocate = 54

allocate keyword.

§

Deallocate = 55

deallocate keyword.

§

Assignment = 56

assignment keyword.

§

Bind = 57

bind keyword.

§

Call = 58

call keyword.

§

Class = 59

class keyword.

§

Common = 60

common keyword.

§

Contains = 61

contains keyword.

§

Continue = 62

continue keyword.

§

Cycle = 63

cycle keyword.

§

Data = 64

data keyword.

§

Default = 65

default keyword.

§

Dimension = 66

dimension keyword.

§

Elemental = 67

elemental keyword.

§

Entry = 68

entry keyword.

§

Equivalence = 69

equivalence keyword.

§

Exit = 70

exit keyword.

§

External = 71

external keyword.

§

Final = 72

final keyword.

§

Format = 73

format keyword.

§

Generic = 74

generic keyword.

§

Go = 75

go keyword.

§

Goto = 76

goto keyword.

§

Implicit = 77

implicit keyword.

§

Import = 78

import keyword.

§

Include = 79

include keyword.

§

Intent = 80

intent keyword.

§

Intrinsic = 81

intrinsic keyword.

§

Kind = 82

kind keyword.

§

Len = 83

len keyword.

§

None = 84

none keyword.

§

Nullify = 85

nullify keyword.

§

Only = 86

only keyword.

§

Optional = 87

optional keyword.

§

Parameter = 88

parameter keyword.

§

Pause = 89

pause keyword.

§

Pointer = 90

pointer keyword.

§

Print = 91

print keyword.

§

Private = 92

private keyword.

§

Protected = 93

protected keyword.

§

Public = 94

public keyword.

§

Pure = 95

pure keyword.

§

Read = 96

read keyword.

§

Recursive = 97

recursive keyword.

§

Result = 98

result keyword.

§

Return = 99

return keyword.

§

Rewind = 100

rewind keyword.

§

Save = 101

save keyword.

§

Stop = 102

stop keyword.

§

Target = 103

target keyword.

§

Use = 104

use keyword.

§

Value = 105

value keyword.

§

Volatile = 106

volatile keyword.

§

Wait = 107

wait keyword.

§

Write = 108

write keyword.

§

Inquire = 109

inquire keyword.

§

Backspace = 110

backspace keyword.

§

Close = 111

close keyword.

§

Open = 112

open keyword.

§

To = 113

to keyword.

§

End = 114

end keyword.

§

Double = 115

double keyword.

§

Precision = 116

precision keyword.

§

Integer = 117

integer type.

§

Real = 118

real type.

§

DoublePrecision = 119

double precision type.

§

Complex = 120

complex type.

§

Character = 121

character type.

§

Logical = 122

logical type.

§

Plus = 123

Plus +.

§

Minus = 124

Minus -.

§

Star = 125

Star *.

§

Slash = 126

Slash /.

§

StarStar = 127

Double star **.

§

Power = 128

Power ** (alias).

§

Concatenate = 129

Concatenate //.

§

Equal = 130

Equal ==.

§

EqualEqual = 131

Equal equal == (alias).

§

NotEqual = 132

Not equal /=.

§

SlashEqual = 133

Slash equal /= (alias).

§

LessThan = 134

Less than <.

§

Less = 135

Less than < (alias).

§

GreaterThan = 136

Greater than >.

§

Greater = 137

Greater than > (alias).

§

LessEqual = 138

Less than or equal <=.

§

GreaterEqual = 139

Greater than or equal >=.

§

Assign = 140

Assign =.

§

Arrow = 141

Arrow =>.

§

And = 142

Logical AND .and..

§

Or = 143

Logical OR .or..

§

Not = 144

Logical NOT .not..

§

Eqv = 145

Logical EQV .eqv..

§

Equivalent = 146

Logical EQV (alias).

§

Neqv = 147

Logical NEQV .neqv..

§

NotEquivalent = 148

Logical NEQV (alias).

§

Eq = 149

Relational EQ .eq..

§

Ne = 150

Relational NE .ne..

§

Lt = 151

Relational LT .lt..

§

Le = 152

Relational LE .le..

§

Gt = 153

Relational GT .gt..

§

Ge = 154

Relational GE .ge..

§

LeftParen = 155

Left parenthesis (.

§

RightParen = 156

Right parenthesis ).

§

LeftBracket = 157

Left bracket [.

§

RightBracket = 158

Right bracket ].

§

Comma = 159

Comma ,.

§

Colon = 160

Colon :.

§

DoubleColon = 161

Double colon ::.

§

ColonColon = 162

Double colon :: (alias).

§

Semicolon = 163

Semicolon ;.

§

Percent = 164

Percent %.

§

Ampersand = 165

Ampersand &.

§

Dot = 166

Dot ..

§

Root = 167

Root node.

§

Error = 168

Error token.

§

Eof = 169

End of file.

§

EndFile = 170

End of file (alternate).

Implementations§

Source§

impl FortranTokenType

Source

pub fn is_trivia(&self) -> bool

Returns true if the token is trivia (whitespace, newline, or comment).

Source

pub fn is_keyword(self) -> bool

Returns true if the token is a keyword.

Trait Implementations§

Source§

impl Clone for FortranTokenType

Source§

fn clone(&self) -> FortranTokenType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FortranTokenType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for FortranTokenType

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<FortranTokenType> for FortranElementType

Source§

fn from(token: FortranTokenType) -> Self

Converts to this type from the input type.
Source§

impl Hash for FortranTokenType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for FortranTokenType

Source§

fn eq(&self, other: &FortranTokenType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for FortranTokenType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TokenType for FortranTokenType

Source§

const END_OF_STREAM: Self = Self::Error

A constant representing the end of the input stream.
Source§

type Role = UniversalTokenRole

The associated role type for this token kind.
Source§

fn is_ignored(&self) -> bool

Returns true if this token represents trivia (whitespace, comments, etc.).
Source§

fn role(&self) -> Self::Role

Returns the general syntactic role of this token. Read more
Source§

fn is_role(&self, role: Self::Role) -> bool

Returns true if this token matches the specified language-specific role.
Source§

fn is_universal(&self, role: UniversalTokenRole) -> bool

Returns true if this token matches the specified universal role.
Source§

fn is_comment(&self) -> bool

Returns true if this token represents a comment.
Source§

fn is_whitespace(&self) -> bool

Returns true if this token represents whitespace.
Source§

fn is_error(&self) -> bool

Returns true if this token represents an error condition.
Source§

fn is_end_of_stream(&self) -> bool

Returns true if this token represents the end of the input stream.
Source§

impl Copy for FortranTokenType

Source§

impl Eq for FortranTokenType

Source§

impl StructuralPartialEq for FortranTokenType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,