fix the test
This commit is contained in:
@@ -74,7 +74,7 @@ impl SyntaxKind {
|
|||||||
EOF => &SyntaxInfo { name: "EOF" },
|
EOF => &SyntaxInfo { name: "EOF" },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub(crate) fn from_keyword(ident: &str) -> Option<SyntaxKind> {
|
pub fn from_keyword(ident: &str) -> Option<SyntaxKind> {
|
||||||
let kw = match ident {
|
let kw = match ident {
|
||||||
{%- for kw in keywords %}
|
{%- for kw in keywords %}
|
||||||
"{{kw}}" => {{kw | upper}}_KW,
|
"{{kw}}" => {{kw | upper}}_KW,
|
||||||
@@ -84,7 +84,7 @@ impl SyntaxKind {
|
|||||||
Some(kw)
|
Some(kw)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn from_char(c: char) -> Option<SyntaxKind> {
|
pub fn from_char(c: char) -> Option<SyntaxKind> {
|
||||||
let tok = match c {
|
let tok = match c {
|
||||||
{%- for t in single_byte_tokens %}
|
{%- for t in single_byte_tokens %}
|
||||||
'{{t.0}}' => {{t.1}},
|
'{{t.0}}' => {{t.1}},
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ pub use teraron::{Mode, Overwrite, Verify};
|
|||||||
pub type Result<T> = std::result::Result<T, failure::Error>;
|
pub type Result<T> = std::result::Result<T, failure::Error>;
|
||||||
|
|
||||||
pub const GRAMMAR: &str = "crates/ra_syntax/src/grammar.ron";
|
pub const GRAMMAR: &str = "crates/ra_syntax/src/grammar.ron";
|
||||||
const GRAMMAR_DIR: &str = "crates/ra_syntax/src/parsing/grammar";
|
const GRAMMAR_DIR: &str = "crates/ra_parser/src/grammar";
|
||||||
const OK_INLINE_TESTS_DIR: &str = "crates/ra_syntax/tests/data/parser/inline/ok";
|
const OK_INLINE_TESTS_DIR: &str = "crates/ra_syntax/tests/data/parser/inline/ok";
|
||||||
const ERR_INLINE_TESTS_DIR: &str = "crates/ra_syntax/tests/data/parser/inline/err";
|
const ERR_INLINE_TESTS_DIR: &str = "crates/ra_syntax/tests/data/parser/inline/err";
|
||||||
|
|
||||||
pub const SYNTAX_KINDS: &str = "crates/ra_syntax/src/syntax_kinds/generated.rs.tera";
|
pub const SYNTAX_KINDS: &str = "crates/ra_parser/src/syntax_kind/generated.rs.tera";
|
||||||
pub const AST: &str = "crates/ra_syntax/src/ast/generated.rs.tera";
|
pub const AST: &str = "crates/ra_syntax/src/ast/generated.rs.tera";
|
||||||
const TOOLCHAIN: &str = "stable";
|
const TOOLCHAIN: &str = "stable";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user