feat!: remove dot, cross operator

This commit is contained in:
Shunsuke Shibayama 2024-01-28 22:19:15 +09:00
parent 06a4a6e5fc
commit ccb54e0115
2 changed files with 1 additions and 7 deletions

View file

@ -780,8 +780,6 @@ impl Lexer /*<'a>*/ {
"contains" => ContainsOp,
"is!" => IsOp,
"isnot!" => IsNotOp,
"dot" => DotOp,
"cross" => CrossOp,
"ref" => RefOp,
"ref!" => RefMutOp,
// これらはリテラルというより定数だが便宜的にリテラルということにしておく

View file

@ -124,10 +124,6 @@ pub enum TokenKind {
AndOp,
/// `or`
OrOp,
/// `dot` (scalar product)
DotOp,
/// `cross` (vector product)
CrossOp,
/// `ref` (special unary)
RefOp,
/// `ref!` (special unary)
@ -279,7 +275,7 @@ impl TokenKind {
Dot | DblColon => 200, // .
Pow => 190, // **
PrePlus | PreMinus | PreBitNot | RefOp | RefMutOp => 180, // (unary) + - * ~ ref ref!
Star | Slash | FloorDiv | Mod | CrossOp | DotOp => 170, // * / // % cross dot
Star | Slash | FloorDiv | Mod => 170, // * / // %
Plus | Minus => 160, // + -
Shl | Shr => 150, // << >>
BitAnd => 140, // &&