Skip to main content

AdaTokenType

Enum AdaTokenType 

Source
pub enum AdaTokenType {
Show 116 variants Whitespace, Newline, Comment, StringLiteral, CharacterLiteral, NumberLiteral, Identifier, Abort, Abs, Abstract, Accept, Access, Aliased, All, And, Array, At, Begin, Body, Case, Constant, Declare, Delay, Delta, Digits, Do, Else, Elsif, End, Entry, Exception, Exit, For, Function, Generic, Goto, If, In, Interface, Is, Limited, Loop, Mod, New, Not, Null, Of, Or, Others, Out, Overriding, Package, Pragma, Private, Procedure, Protected, Raise, Range, Record, Rem, Renames, Requeue, Return, Reverse, Select, Separate, Some, Subtype, Synchronized, Tagged, Task, Terminate, Then, Type, Until, Use, When, While, With, Xor, Plus, Minus, Star, Slash, Ampersand, Eq, Ne, Lt, Le, Gt, Ge, Assign, ColonEq, Arrow, Dot, DotDot, Comma, Colon, Semicolon, Bar, Pipe, Apostrophe, Tick, LeftParen, RightParen, Box, DoubleStar, StarStar, LtLt, GtGt, LeftBracket, RightBracket, LeftBrace, RightBrace, Eof, Error,
}
Expand description

Ada 词法分析器的词法单元类型。

Variants§

§

Whitespace

空白字符。

§

Newline

换行符。

§

Comment

注释。

§

StringLiteral

字符串字面量。

§

CharacterLiteral

字符字面量。

§

NumberLiteral

数字字面量。

§

Identifier

标识符。

§

Abort

abort 关键字。

§

Abs

abs 关键字。

§

Abstract

abstract 关键字。

§

Accept

accept 关键字。

§

Access

access 关键字。

§

Aliased

aliased 关键字。

§

All

all 关键字。

§

And

and 关键字。

§

Array

array 关键字。

§

At

at 关键字。

§

Begin

begin 关键字。

§

Body

body 关键字。

§

Case

case 关键字。

§

Constant

constant 关键字。

§

Declare

declare 关键字。

§

Delay

delay 关键字。

§

Delta

delta 关键字。

§

Digits

digits 关键字。

§

Do

do 关键字。

§

Else

else 关键字。

§

Elsif

elsif 关键字。

§

End

end 关键字。

§

Entry

entry 关键字。

§

Exception

exception 关键字。

§

Exit

exit 关键字。

§

For

for 关键字。

§

Function

function 关键字。

§

Generic

generic 关键字。

§

Goto

goto 关键字。

§

If

if 关键字。

§

In

in 关键字。

§

Interface

interface 关键字。

§

Is

is 关键字。

§

Limited

limited 关键字。

§

Loop

loop 关键字。

§

Mod

mod 关键字。

§

New

new 关键字。

§

Not

not 关键字。

§

Null

null 关键字。

§

Of

of 关键字。

§

Or

or 关键字。

§

Others

others 关键字。

§

Out

out 关键字。

§

Overriding

overriding 关键字。

§

Package

package 关键字。

§

Pragma

pragma 关键字。

§

Private

private 关键字。

§

Procedure

procedure 关键字。

§

Protected

protected 关键字。

§

Raise

raise 关键字。

§

Range

range 关键字。

§

Record

record 关键字。

§

Rem

rem 关键字。

§

Renames

renames 关键字。

§

Requeue

requeue 关键字。

§

Return

return 关键字。

§

Reverse

reverse 关键字。

§

Select

select 关键字。

§

Separate

separate 关键字。

§

Some

some 关键字。

§

Subtype

subtype 关键字。

§

Synchronized

synchronized 关键字。

§

Tagged

tagged 关键字。

§

Task

task 关键字。

§

Terminate

terminate 关键字。

§

Then

then 关键字。

§

Type

type 关键字。

§

Until

until 关键字。

§

Use

use 关键字。

§

When

when 关键字。

§

While

while 关键字。

§

With

with 关键字。

§

Xor

xor 关键字。

§

Plus

加号 (+)。

§

Minus

减号 (-)。

§

Star

乘号 (*)。

§

Slash

除号 (/)。

§

Ampersand

连接符 (&)。

§

Eq

等于 (=)。

§

Ne

不等于 (/=)。

§

Lt

小于 (<)。

§

Le

小于等于 (<=)。

§

Gt

大于 (>)。

§

Ge

大于等于 (>=)。

§

Assign

赋值 (:=)。

§

ColonEq

赋值别名 (:=)。

§

Arrow

箭头 (=>)。

§

Dot

点 (.)。

§

DotDot

范围 (..)。

§

Comma

逗号 (,)。

§

Colon

冒号 (:)。

§

Semicolon

分号 (;)。

§

Bar

竖线 (|)。

§

Pipe

竖线别名 (|)。

§

Apostrophe

撇号 (')。

§

Tick

撇号别名 (')。

§

LeftParen

左括号 (()。

§

RightParen

右括号 ())。

§

Box

框号 (<>)。

§

DoubleStar

幂运算 (**)。

§

StarStar

幂运算别名 (**)。

§

LtLt

左标签分隔符 (<<)。

§

GtGt

右标签分隔符 (>>)。

§

LeftBracket

左方括号 ([)。

§

RightBracket

右方括号 (])。

§

LeftBrace

左花括号 ({)。

§

RightBrace

右花括号 (})。

§

Eof

流结束。

§

Error

错误标记。

Implementations§

Source§

impl AdaTokenType

Source

pub fn is_keyword(&self) -> bool

是否为关键字

Source

pub fn is_identifier(&self) -> bool

是否为标识符

Source

pub fn is_literal(&self) -> bool

是否为字面量

Trait Implementations§

Source§

impl Clone for AdaTokenType

Source§

fn clone(&self) -> AdaTokenType

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 AdaTokenType

Source§

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

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

impl<'de> Deserialize<'de> for AdaTokenType

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<AdaTokenType> for AdaElementType

Source§

fn from(token_type: AdaTokenType) -> Self

Converts to this type from the input type.
Source§

impl Hash for AdaTokenType

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 Ord for AdaTokenType

Source§

fn cmp(&self, other: &AdaTokenType) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for AdaTokenType

Source§

fn eq(&self, other: &AdaTokenType) -> 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 PartialOrd for AdaTokenType

Source§

fn partial_cmp(&self, other: &AdaTokenType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for AdaTokenType

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 AdaTokenType

Source§

const END_OF_STREAM: Self = Self::Eof

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

type Role = UniversalTokenRole

The associated role type for this token kind.
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 role(&self) -> Self::Role

Returns the general syntactic role of this token.
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_ignored(&self) -> bool

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

fn is_end_of_stream(&self) -> bool

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

impl Copy for AdaTokenType

Source§

impl Eq for AdaTokenType

Source§

impl StructuralPartialEq for AdaTokenType

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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,