pub struct JsonLanguage {
pub trailing_comma: bool,
pub bare_keys: bool,
pub single_quotes: bool,
pub comments: bool,
pub hex_numbers: bool,
pub infinity_and_nan: bool,
}Expand description
JSON 语言实现
Fields§
§trailing_comma: bool是否允许尾随逗号
bare_keys: bool是否允许裸键(不带引号的键)
single_quotes: bool是否允许单引号字符串
comments: bool是否允许注释
hex_numbers: bool是否允许十六进制数字
infinity_and_nan: bool是否允许无穷大和 NaN
Implementations§
Trait Implementations§
Source§impl Clone for JsonLanguage
impl Clone for JsonLanguage
Source§fn clone(&self) -> JsonLanguage
fn clone(&self) -> JsonLanguage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JsonLanguage
impl Debug for JsonLanguage
Source§impl Default for JsonLanguage
impl Default for JsonLanguage
Source§impl Language for JsonLanguage
impl Language for JsonLanguage
Source§type SyntaxKind = JsonSyntaxKind
type SyntaxKind = JsonSyntaxKind
The kind kind type used to represent different kind and node types in the language. Read more
Source§impl<'config> Lexer<JsonLanguage> for JsonLexer<'config>
impl<'config> Lexer<JsonLanguage> for JsonLexer<'config>
Source§fn lex_incremental(
&self,
source: impl Source,
_start_offset: usize,
_cache: IncrementalCache<'_, JsonLanguage>,
) -> LexOutput<JsonLanguage>
fn lex_incremental( &self, source: impl Source, _start_offset: usize, _cache: IncrementalCache<'_, JsonLanguage>, ) -> LexOutput<JsonLanguage>
Tokenizes source text using an existing cache for incremental parsing. Read more
Source§impl PartialEq for JsonLanguage
impl PartialEq for JsonLanguage
impl Copy for JsonLanguage
impl Eq for JsonLanguage
impl StructuralPartialEq for JsonLanguage
Auto Trait Implementations§
impl Freeze for JsonLanguage
impl RefUnwindSafe for JsonLanguage
impl Send for JsonLanguage
impl Sync for JsonLanguage
impl Unpin for JsonLanguage
impl UnwindSafe for JsonLanguage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more