mago-syntax 1.20.1

A correct, fast, and memory-efficient PHP syntax implementation, including Lexer, Parser, AST, and utilities for Mago.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::token::TokenKind;

pub const CAST_TYPES: [(&[u8], TokenKind); 13] = [
    (b"(int)", TokenKind::IntCast),
    (b"(integer)", TokenKind::IntegerCast),
    (b"(double)", TokenKind::DoubleCast),
    (b"(float)", TokenKind::FloatCast),
    (b"(real)", TokenKind::RealCast),
    (b"(bool)", TokenKind::BoolCast),
    (b"(boolean)", TokenKind::BooleanCast),
    (b"(string)", TokenKind::StringCast),
    (b"(binary)", TokenKind::BinaryCast),
    (b"(array)", TokenKind::ArrayCast),
    (b"(object)", TokenKind::ObjectCast),
    (b"(unset)", TokenKind::UnsetCast),
    (b"(void)", TokenKind::VoidCast),
];