repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_parser/src/token_source.rs
crates/biome_yaml_parser/src/token_source.rs
use biome_parser::lexer::Lexer; use biome_parser::prelude::{ParseDiagnostic, TokenSource}; use biome_parser::token_source::Trivia; use biome_rowan::TriviaPieceKind; use biome_yaml_syntax::YamlSyntaxKind::{self, EOF}; use crate::lexer::YamlLexer; pub(crate) struct YamlTokenSource<'source> { lexer: YamlLexer<'sourc...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_parser/src/parser/flow.rs
crates/biome_yaml_parser/src/parser/flow.rs
use YamlSyntaxKind::*; use biome_parser::{ CompletedMarker, Parser, parse_lists::ParseSeparatedList, parse_recovery::{ParseRecovery, RecoveryResult}, prelude::ParsedSyntax::{self, *}, }; use biome_yaml_syntax::{T, YamlSyntaxKind}; use super::{ YamlParser, parse_error::{ expected_flow_ma...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_parser/src/parser/document.rs
crates/biome_yaml_parser/src/parser/document.rs
use biome_parser::{ Parser, parse_lists::ParseNodeList, parse_recovery::{ParseRecoveryTokenSet, RecoveryResult}, prelude::ParsedSyntax::{self, *}, token_set, }; use biome_yaml_syntax::{ T, YamlSyntaxKind::{self, *}, }; use super::{ YamlParser, block::{is_at_any_block_node, parse_any...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_parser/src/parser/block.rs
crates/biome_yaml_parser/src/parser/block.rs
use std::cell::RefCell; use biome_parser::{ CompletedMarker, Parser, parse_lists::ParseNodeList, parse_recovery::{ParseRecovery, ParseRecoveryTokenSet}, prelude::ParsedSyntax::{self, *}, token_set, }; use biome_yaml_syntax::{ T, YamlSyntaxKind::{self, *}, }; use crate::parser::{flow::parse...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_parser/src/parser/mod.rs
crates/biome_yaml_parser/src/parser/mod.rs
use biome_parser::{ CompletedMarker, Parser, ParserContext, diagnostic::merge_diagnostics, event::Event, parse_lists::ParseNodeList, prelude::{ParseDiagnostic, TokenSource, Trivia}, }; use biome_yaml_syntax::YamlSyntaxKind::{self, *}; use document::DocumentList; use crate::token_source::YamlTokenSo...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_parser/src/parser/parse_error.rs
crates/biome_yaml_parser/src/parser/parse_error.rs
use crate::parser::YamlParser; use biome_diagnostics::location::AsSpan; use biome_parser::{ Parser, diagnostic::{ParseDiagnostic, expected_node}, prelude::TokenSource, }; use biome_rowan::{TextLen, TextRange}; pub(crate) fn expected_block_mapping_entry(p: &YamlParser, range: TextRange) -> ParseDiagnostic {...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_parser/src/lexer/mod.rs
crates/biome_yaml_parser/src/lexer/mod.rs
use std::collections::LinkedList; use biome_parser::{ diagnostic::ParseDiagnostic, lexer::{Lexer, LexerCheckpoint}, }; use biome_rowan::{TextLen, TextRange, TextSize}; use biome_unicode_table::{Dispatch::WHS, lookup_byte}; use biome_yaml_syntax::{T, YamlSyntaxKind, YamlSyntaxKind::*}; mod tests; pub(crate) st...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_parser/src/lexer/tests/flow.rs
crates/biome_yaml_parser/src/lexer/tests/flow.rs
use crate::assert_lex; #[test] fn lex_double_quoted_literal() { assert_lex!( "\"hello world\"", FLOW_START:0, DOUBLE_QUOTED_LITERAL:13, FLOW_END:0, ); } #[test] fn lex_multiline_double_quoted_literal() { assert_lex!( r#" "hello world" "#, NEWLINE:1, ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_parser/src/lexer/tests/document.rs
crates/biome_yaml_parser/src/lexer/tests/document.rs
use crate::assert_lex; #[test] fn lex_doc_end() { assert_lex!( "...", DOC_END:3, ); } #[test] fn lex_doc_end_followed_by_trivia() { assert_lex!( "... # trivia", DOC_END:3, WHITESPACE:1, COMMENT:8, ); } #[test] fn lex_doc_end_followed_unexpected_token() ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_parser/src/lexer/tests/block.rs
crates/biome_yaml_parser/src/lexer/tests/block.rs
use crate::assert_lex; #[test] fn lex_simple_mapping_key() { assert_lex!( "abc:", MAPPING_START:0, PLAIN_LITERAL:3, COLON:1, MAPPING_END:0, ); } #[test] fn lex_mapping_key_special_char() { assert_lex!( "ab,c:d e-[f:#gh: ", MAPPING_START:0, PL...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_parser/src/lexer/tests/mod.rs
crates/biome_yaml_parser/src/lexer/tests/mod.rs
#![cfg(test)] mod block; mod document; mod flow; use super::TextSize; use crate::lexer::YamlLexer; use biome_parser::lexer::Lexer; use quickcheck_macros::quickcheck; use std::sync::mpsc::channel; use std::thread; use std::time::Duration; // Assert the result of lexing a piece of source code, // and make sure the tok...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_parser/tests/spec_test.rs
crates/biome_yaml_parser/tests/spec_test.rs
use biome_console::fmt::{Formatter, Termcolor}; use biome_console::markup; use biome_diagnostics::DiagnosticExt; use biome_diagnostics::display::PrintDiagnostic; use biome_diagnostics::termcolor; use biome_rowan::SyntaxKind; use biome_test_utils::validate_eof_token; use biome_yaml_parser::parse_yaml; use std::fmt::Writ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_parser/tests/spec_tests.rs
crates/biome_yaml_parser/tests/spec_tests.rs
mod spec_test; mod ok { //! Tests that are valid YAML tests_macros::gen_tests! {"tests/yaml_test_suite/ok/**/*.yaml", crate::spec_test::run, "ok"} } mod err { //! Tests that must fail because they are not valid YAML tests_macros::gen_tests! {"tests/yaml_test_suite/err/**/*.yaml", crate::spec_test::run...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_deserialize/src/merge.rs
crates/biome_deserialize/src/merge.rs
use std::hash::{BuildHasher, Hash}; /// Trait that allows deep merging of types, including injection of defaults. pub trait Merge { /// Merges `other` into `self`. /// /// Values that are non-`None` in `other` will take precedence over values /// in `self`. Complex types may get recursively merged inst...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_deserialize/src/diagnostics.rs
crates/biome_deserialize/src/diagnostics.rs
use biome_console::fmt::Display; use biome_console::{MarkupBuf, markup}; use biome_diagnostics::location::AsSpan; use biome_diagnostics::{ Advices, Diagnostic, DiagnosticTags, LogCategory, MessageAndDescription, Severity, Visit, }; use biome_rowan::{SyntaxError, TextRange}; use enumflags2::{BitFlags, bitflags, make...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_deserialize/src/lib.rs
crates/biome_deserialize/src/lib.rs
//! `biome_deserialize` consists of data structures that know how to deserialize themselves //! along with data formats that know how to deserialize data. //! It provides a framework by which these two groups interact with each other, //! allowing any supported data structure to be deserialized using any supported data...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_deserialize/src/json.rs
crates/biome_deserialize/src/json.rs
//! Implementation of [DeserializableValue] for the JSON data format. use crate::{ DefaultDeserializationContext, Deserializable, DeserializableValue, DeserializationContext, DeserializationVisitor, Deserialized, TextNumber, diagnostics::DeserializableType, }; use biome_diagnostics::{DiagnosticExt, Error}; use ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_deserialize/src/validator.rs
crates/biome_deserialize/src/validator.rs
use crate::{DeserializationContext, DeserializationDiagnostic}; use biome_console::markup; use biome_rowan::TextRange; /// Trait that should be implemented on types that use the /// `#[deserializable(with_validator)]` annotation with the /// [biome_deserialize_macros::Deserializable] derive macro. pub trait Deserializ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_deserialize/src/impls.rs
crates/biome_deserialize/src/impls.rs
//! Implementations of [Deserializable] for common data structures. //! //! Tests of these implementations are available in [biome_deserialize::json::tests] module. use crate::{ Deserializable, DeserializableValue, DeserializationContext, DeserializationDiagnostic, DeserializationVisitor, diagnostics::Deseriali...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_syntax/src/lib.rs
crates/biome_yaml_syntax/src/lib.rs
#![deny(clippy::use_self)] #[macro_use] mod generated; mod file_source; mod syntax_node; pub use self::generated::*; use biome_rowan::{AstNode, RawSyntaxKind}; pub use biome_rowan::{TextLen, TextRange, TextSize, TokenAtOffset, TriviaPieceKind, WalkEvent}; pub use syntax_node::*; impl From<u16> for YamlSyntaxKind { ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_syntax/src/syntax_node.rs
crates/biome_yaml_syntax/src/syntax_node.rs
use crate::{YamlRoot, YamlSyntaxKind}; use biome_rowan::Language; #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] pub struct YamlLanguage; impl Language for YamlLanguage { type Kind = YamlSyntaxKind; type Root = YamlRoot; } pub type YamlSyntaxNode = biome_rowan::SyntaxNode<YamlLa...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_syntax/src/file_source.rs
crates/biome_yaml_syntax/src/file_source.rs
use biome_rowan::FileSourceError; use biome_string_case::StrLikeExtension; use camino::Utf8Path; #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] #[derive( Debug, Clone, Default, Copy, Eq, PartialEq, Hash, serde::Serialize, serde::Deserialize, )] pub struct YamlFileSource { // ?? Options } impl Y...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_syntax/src/generated.rs
crates/biome_yaml_syntax/src/generated.rs
#[rustfmt::skip] pub(super) mod nodes; #[rustfmt::skip] pub mod macros; #[macro_use] pub mod kind; pub use kind::*; pub use nodes::*;
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_syntax/src/generated/nodes_mut.rs
crates/biome_yaml_syntax/src/generated/nodes_mut.rs
//! Generated file, do not edit by hand, see `xtask/codegen` use crate::{YamlSyntaxToken as SyntaxToken, generated::nodes::*}; use biome_rowan::AstNode; use std::iter::once; impl YamlAliasNode { pub fn with_value_token(self, element: SyntaxToken) -> Self { Self::unwrap_cast( self.syntax ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_syntax/src/generated/kind.rs
crates/biome_yaml_syntax/src/generated/kind.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #![allow(bad_style, missing_docs, unreachable_pub)] #[doc = r" The kind of syntax node, e.g. `IDENT`, `FUNCTION_KW`, or `FOR_STMT`."] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] #[repr(u16)] pub enum YamlSyntaxKind { #[doc(hidden)...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_syntax/src/generated/macros.rs
crates/biome_yaml_syntax/src/generated/macros.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #[doc = r" Reconstruct an AstNode from a SyntaxNode"] #[doc = r""] #[doc = r" This macros performs a match over the [kind](biome_rowan::SyntaxNode::kind)"] #[doc = r" of the provided [biome_rowan::SyntaxNode] and constructs the appropriate"] #[doc = r" AstNo...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_yaml_syntax/src/generated/nodes.rs
crates/biome_yaml_syntax/src/generated/nodes.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #![allow(dead_code)] #![allow(unused)] use crate::{ YamlLanguage as Language, YamlSyntaxElement as SyntaxElement, YamlSyntaxElementChildren as SyntaxElementChildren, YamlSyntaxKind::{self as SyntaxKind, *}, YamlSyntaxList as SyntaxList, YamlS...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_factory/src/lib.rs
crates/biome_tailwind_factory/src/lib.rs
#![deny(clippy::use_self)] use biome_rowan::TreeBuilder; use biome_tailwind_syntax::TailwindLanguage; mod generated; pub use crate::generated::TailwindSyntaxFactory; pub mod make; // Re-exported for tests #[doc(hidden)] pub use biome_tailwind_syntax as syntax; pub type TailwindSyntaxTreeBuilder = TreeBuilder<'stati...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_factory/src/make.rs
crates/biome_tailwind_factory/src/make.rs
pub use crate::generated::node_factory::*;
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_factory/src/generated.rs
crates/biome_tailwind_factory/src/generated.rs
#[rustfmt::skip] pub(super) mod syntax_factory; #[rustfmt::skip] pub mod node_factory; pub use syntax_factory::TailwindSyntaxFactory;
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_factory/src/generated/syntax_factory.rs
crates/biome_tailwind_factory/src/generated/syntax_factory.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #![allow(unused_mut)] use biome_rowan::{ AstNode, ParsedChildren, RawNodeSlots, RawSyntaxNode, SyntaxFactory, SyntaxKind, }; use biome_tailwind_syntax::{T, TailwindSyntaxKind, TailwindSyntaxKind::*, *}; #[derive(Debug)] pub struct TailwindSyntaxFactory; ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_factory/src/generated/node_factory.rs
crates/biome_tailwind_factory/src/generated/node_factory.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #![allow(clippy::redundant_closure)] use biome_rowan::AstNode; use biome_tailwind_syntax::{ TailwindSyntaxElement as SyntaxElement, TailwindSyntaxNode as SyntaxNode, TailwindSyntaxToken as SyntaxToken, *, }; pub fn tw_arbitrary_candidate( l_brack...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/src/markup.rs
crates/biome_console/src/markup.rs
use std::{ borrow::Cow, fmt::{self, Debug}, io, }; use biome_text_size::TextSize; use termcolor::{Color, ColorSpec}; use crate::fmt::{Display, Formatter, MarkupElements, Write}; /// Enumeration of all the supported markup elements #[derive(Clone, Debug, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde",...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/src/lib.rs
crates/biome_console/src/lib.rs
#![deny(clippy::use_self)] use std::io; use std::io::{IsTerminal, Read, Write}; use std::panic::RefUnwindSafe; use termcolor::{ColorChoice, StandardStream}; use write::Termcolor; pub mod fmt; mod markup; mod utils; mod write; pub use self::markup::{Markup, MarkupBuf, MarkupElement, MarkupNode}; pub use biome_markup:...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/src/write.rs
crates/biome_console/src/write.rs
mod html; mod termcolor; use std::{fmt, io}; use crate::fmt::MarkupElements; pub use self::{html::HTML, termcolor::Termcolor}; pub trait Write { fn write_str(&mut self, elements: &MarkupElements, content: &str) -> io::Result<()>; fn write_fmt(&mut self, elements: &MarkupElements, content: fmt::Arguments) ->...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/src/utils.rs
crates/biome_console/src/utils.rs
use crate::fmt::{Display, Formatter}; use crate::{Markup, markup}; use std::io; /// It displays a type that implements [std::fmt::Display] pub struct DebugDisplay<T>(pub T); impl<T> Display for DebugDisplay<T> where T: std::fmt::Display, { fn fmt(&self, f: &mut Formatter<'_>) -> io::Result<()> { write...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/src/fmt.rs
crates/biome_console/src/fmt.rs
use std::{borrow::Cow, fmt, io, time::Duration}; pub use crate::write::{HTML, Termcolor, Write}; use crate::{Markup, MarkupElement, markup}; /// A stack-allocated linked-list of [MarkupElement] slices #[derive(Clone, Copy)] pub enum MarkupElements<'a> { Root, Node(&'a Self, &'a [MarkupElement<'a>]), } impl<'...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/src/write/html.rs
crates/biome_console/src/write/html.rs
use std::{ fmt, io::{self, Write as _}, }; use crate::{MarkupElement, fmt::MarkupElements}; use super::Write; /// Adapter struct implementing [Write] over types implementing [io::Write], /// renders markup as UTF-8 strings of HTML code pub struct HTML<W>(pub W, bool); impl<W> HTML<W> { pub fn new(writer...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/src/write/termcolor.rs
crates/biome_console/src/write/termcolor.rs
use std::{ fmt::{self, Write as _}, io, }; use termcolor::{Color, ColorSpec, WriteColor}; use unicode_segmentation::UnicodeSegmentation; use unicode_width::UnicodeWidthStr; use crate::{MarkupElement, fmt::MarkupElements}; use super::Write; /// Adapter struct implementing [Write] over types implementing [Wri...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/tests/macro.rs
crates/biome_console/tests/macro.rs
use biome_console::{Markup, MarkupElement}; #[test] fn test_macro() { let category = "test"; match // Due to how MarkupNode is implemented, the result of the markup macro // cannot be stored in a binding and must be matched upon immediately biome_markup::markup! { <Info><Emphasis>{category...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/tests/markup/open_element_unfinished_4.rs
crates/biome_console/tests/markup/open_element_unfinished_4.rs
fn main() { biome_console::markup! { <Emphasis prop } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/tests/markup/open_element_unfinished_3.rs
crates/biome_console/tests/markup/open_element_unfinished_3.rs
fn main() { biome_console::markup! { <Emphasis / } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/tests/markup/unclosed_element.rs
crates/biome_console/tests/markup/unclosed_element.rs
fn main() { biome_console::markup! { <Emphasis> } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/tests/markup/open_element_unfinished_2.rs
crates/biome_console/tests/markup/open_element_unfinished_2.rs
fn main() { biome_console::markup! { <Emphasis } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/tests/markup/open_element_improper_prop_value.rs
crates/biome_console/tests/markup/open_element_improper_prop_value.rs
fn main() { biome_console::markup! { <Emphasis property=ident /> } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/tests/markup/open_element_improper_close_2.rs
crates/biome_console/tests/markup/open_element_improper_close_2.rs
fn main() { biome_console::markup! { <Emphasis /"Literal" } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/tests/markup/open_element_unfinished_5.rs
crates/biome_console/tests/markup/open_element_unfinished_5.rs
fn main() { biome_console::markup! { <Emphasis prop= } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/tests/markup/open_element_improper_close_1.rs
crates/biome_console/tests/markup/open_element_improper_close_1.rs
fn main() { biome_console::markup! { <Emphasis /< } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/tests/markup/open_element_unfinished_6.rs
crates/biome_console/tests/markup/open_element_unfinished_6.rs
fn main() { biome_console::markup! { <Emphasis prop={} } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/tests/markup/element_non_ident_name.rs
crates/biome_console/tests/markup/element_non_ident_name.rs
fn main() { biome_console::markup! { <"Literal" /> } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/tests/markup/invalid_group.rs
crates/biome_console/tests/markup/invalid_group.rs
fn main() { biome_console::markup! { [] } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/tests/markup/closing_element_mismatch.rs
crates/biome_console/tests/markup/closing_element_mismatch.rs
fn main() { biome_console::markup! { <Emphasis></Error> } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/tests/markup/open_element_missing_prop_value.rs
crates/biome_console/tests/markup/open_element_missing_prop_value.rs
fn main() { biome_console::markup! { <Emphasis property /> } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/tests/markup/open_element_unfinished_7.rs
crates/biome_console/tests/markup/open_element_unfinished_7.rs
fn main() { biome_console::markup! { <Emphasis prop="" } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/tests/markup/invalid_punct.rs
crates/biome_console/tests/markup/invalid_punct.rs
fn main() { biome_console::markup! { ! } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/tests/markup/open_element_unfinished_1.rs
crates/biome_console/tests/markup/open_element_unfinished_1.rs
fn main() { biome_console::markup! { < } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_console/tests/markup/closing_element_standalone.rs
crates/biome_console/tests/markup/closing_element_standalone.rs
fn main() { biome_console::markup! { </Emphasis> } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_lsp/src/diagnostics.rs
crates/biome_lsp/src/diagnostics.rs
use crate::utils::into_lsp_error; use anyhow::Error; use biome_diagnostics::print_diagnostic_to_string; use biome_service::WorkspaceError; use std::fmt::{Display, Formatter}; use tower_lsp_server::ls_types::MessageType; use tower_lsp_server::{Client, jsonrpc}; #[derive(Debug)] pub enum LspError { WorkspaceError(Wo...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_lsp/src/lib.rs
crates/biome_lsp/src/lib.rs
#![deny(clippy::use_self)] mod capabilities; mod diagnostics; mod documents; mod extension_settings; mod handlers; mod requests; mod server; mod session; mod utils; pub use crate::extension_settings::WorkspaceSettings; pub use crate::server::{LSPServer, ServerConnection, ServerFactory};
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_lsp/src/documents.rs
crates/biome_lsp/src/documents.rs
use biome_line_index::LineIndex; use biome_service::projects::ProjectKey; /// Represents an open [`textDocument`]. Can be cheaply cloned. /// /// [`textDocument`]: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentItem #[derive(Debug, Clone)] pub(crate) struct Docu...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_lsp/src/handlers.rs
crates/biome_lsp/src/handlers.rs
pub(crate) mod analysis; pub(crate) mod formatting; pub(crate) mod text_document;
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_lsp/src/session.rs
crates/biome_lsp/src/session.rs
use crate::diagnostics::LspError; use crate::documents::Document; use crate::extension_settings::{CONFIGURATION_SECTION, ExtensionSettings}; use crate::utils; use anyhow::Result; use biome_analyze::RuleCategoriesBuilder; use biome_configuration::ConfigurationPathHint; use biome_console::markup; use biome_deserialize::M...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_lsp/src/utils.rs
crates/biome_lsp/src/utils.rs
use anyhow::{Context, Result, ensure}; use biome_analyze::ActionCategory; use biome_console::fmt::Termcolor; use biome_console::fmt::{self, Formatter}; use biome_console::{MarkupBuf, markup}; use biome_diagnostics::termcolor::NoColor; use biome_diagnostics::{ Applicability, LogCategory, {Diagnostic, DiagnosticT...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_lsp/src/server.rs
crates/biome_lsp/src/server.rs
use crate::capabilities::{DEFAULT_CODE_ACTION_CAPABILITIES, server_capabilities}; use crate::diagnostics::{LspError, handle_lsp_error}; use crate::requests::syntax_tree::{SYNTAX_TREE_REQUEST, SyntaxTreePayload}; use crate::session::{ CapabilitySet, CapabilityStatus, ClientInformation, Session, SessionHandle, Sessio...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_lsp/src/server.tests.rs
crates/biome_lsp/src/server.tests.rs
use std::any::type_name; use std::collections::{BTreeMap, HashMap}; use std::fmt::Display; use std::slice; use std::str::FromStr; use anyhow::{Context, Error, Result, bail}; use biome_analyze::RuleCategories; use biome_configuration::analyzer::RuleSelector; use biome_diagnostics::PrintDescription; use biome_fs::{Biome...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_lsp/src/extension_settings.rs
crates/biome_lsp/src/extension_settings.rs
use std::str::FromStr; use camino::Utf8PathBuf; use serde::{Deserialize, Serialize}; use serde_json::{Error, Value}; use tracing::debug; pub(crate) const CONFIGURATION_SECTION: &str = "biome"; #[derive(Debug, Default, Clone, Deserialize, Serialize, PartialEq, Eq)] #[serde(rename_all = "camelCase")] /// The settings ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_lsp/src/capabilities.rs
crates/biome_lsp/src/capabilities.rs
use biome_analyze::{SUPPRESSION_INLINE_ACTION_CATEGORY, SUPPRESSION_TOP_LEVEL_ACTION_CATEGORY}; use biome_line_index::WideEncoding; use biome_lsp_converters::{PositionEncoding, negotiated_encoding}; use tower_lsp_server::ls_types::{ ClientCapabilities, CodeActionKind, CodeActionOptions, CodeActionProviderCapability...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_lsp/src/requests/syntax_tree.rs
crates/biome_lsp/src/requests/syntax_tree.rs
use crate::{diagnostics::LspError, session::Session}; use biome_service::workspace::{ FeaturesBuilder, GetSyntaxTreeParams, IgnoreKind, PathIsIgnoredParams, }; use serde::{Deserialize, Serialize}; use tower_lsp_server::ls_types::{TextDocumentIdentifier, Uri}; use tracing::info; pub const SYNTAX_TREE_REQUEST: &str ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_lsp/src/requests/mod.rs
crates/biome_lsp/src/requests/mod.rs
pub(crate) mod syntax_tree;
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_lsp/src/handlers/analysis.rs
crates/biome_lsp/src/handlers/analysis.rs
use crate::diagnostics::LspError; use crate::session::Session; use crate::utils; use anyhow::{Context, Result}; use biome_analyze::{ ActionCategory, RuleCategoriesBuilder, SUPPRESSION_INLINE_ACTION_CATEGORY, SUPPRESSION_TOP_LEVEL_ACTION_CATEGORY, SourceActionKind, }; use biome_configuration::analyzer::{Analyzer...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_lsp/src/handlers/text_document.rs
crates/biome_lsp/src/handlers/text_document.rs
use crate::diagnostics::LspError; use crate::session::ConfigurationStatus; use crate::utils::apply_document_changes; use crate::{documents::Document, session::Session}; use biome_configuration::ConfigurationPathHint; use biome_service::workspace::{ ChangeFileParams, CloseFileParams, DocumentFileSource, FeaturesBuil...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_lsp/src/handlers/formatting.rs
crates/biome_lsp/src/handlers/formatting.rs
use crate::diagnostics::LspError; use crate::session::Session; use crate::utils::text_edit; use anyhow::Context; use biome_fs::BiomePath; use biome_lsp_converters::from_proto; use biome_rowan::{TextLen, TextRange, TextSize}; use biome_service::file_handlers::astro::AstroFileHandler; use biome_service::file_handlers::sv...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/utility_types.rs
crates/biome_rowan/src/utility_types.rs
use std::{fmt, ops::Deref}; #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum NodeOrToken<N, T> { Node(N), Token(T), } impl<N, T> NodeOrToken<N, T> { pub fn into_node(self) -> Option<N> { match self { Self::Node(node) => Some(node), Self::Token(_)...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/cursor.rs
crates/biome_rowan/src/cursor.rs
//! Implementation of the cursors -- API for convenient access to syntax trees. //! //! Functional programmers will recognize that this module implements a zipper //! for a purely functional (green) tree. //! //! A cursor node (`SyntaxNode`) points to a `GreenNode` and a parent //! `SyntaxNode`. This allows cursor to p...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/green.rs
crates/biome_rowan/src/green.rs
mod element; mod node; mod node_cache; mod token; mod trivia; pub(crate) use self::{ element::{GreenElement, GreenElementRef}, node::{Child, Children, GreenNode, GreenNodeData, Slot}, token::{GreenToken, GreenTokenData}, trivia::GreenTrivia, }; pub use self::node_cache::NodeCache; pub(crate) use self:...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/lib.rs
crates/biome_rowan/src/lib.rs
//! A generic library for lossless syntax trees. //! See `examples/s_expressions.rs` for a tutorial. #![forbid( // missing_debug_implementations, unconditional_recursion, future_incompatible, // missing_docs, )] #![deny(clippy::use_self)] #![deny(unsafe_code)] #![deny(rustdoc::broken_intra_doc_links)] #![expect(clippy:...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/syntax_node_text.rs
crates/biome_rowan/src/syntax_node_text.rs
use crate::{ Text, TextRange, TextSize, TokenAtOffset, cursor::{SyntaxNode, SyntaxToken}, }; use biome_text_size::TextLen; use std::iter::FusedIterator; use std::{cmp::Ordering, fmt}; #[derive(Clone)] pub struct SyntaxNodeText { node: SyntaxNode, range: TextRange, } impl SyntaxNodeText { pub(crate...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/syntax.rs
crates/biome_rowan/src/syntax.rs
mod element; mod node; mod rewriter; mod token; mod trivia; use crate::{AstNode, RawSyntaxKind}; pub use element::{SyntaxElement, SyntaxElementKey}; pub use node::{ AnySyntaxNode, EmbeddedSendNode, Preorder, PreorderWithTokens, SendNode, SyntaxElementChildren, SyntaxNode, SyntaxNodeChildren, SyntaxNodeOptionEx...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/text.rs
crates/biome_rowan/src/text.rs
use std::borrow::Borrow; use std::hash::{Hash, Hasher}; use std::mem::{self, ManuallyDrop}; use std::ops::Deref; use std::ptr::{self, NonNull}; use std::{slice, str}; use crate::TokenText; /// Type used for storing text from a syntax tree that avoids heap-allocations /// when possible. /// /// This is somewhat simila...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/tree_builder.rs
crates/biome_rowan/src/tree_builder.rs
use crate::{ GreenNode, Language, NodeOrToken, ParsedChildren, SyntaxFactory, SyntaxKind, SyntaxNode, cow_mut::CowMut, green::{GreenElement, NodeCache, NodeCacheNodeEntryMut}, syntax::TriviaPiece, }; use std::{marker::PhantomData, num::NonZeroUsize}; /// A checkpoint for maybe wrapping a node. See `Gre...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/syntax_factory.rs
crates/biome_rowan/src/syntax_factory.rs
mod parsed_children; mod raw_syntax; use crate::SyntaxKind; use std::fmt; use std::iter::{FusedIterator, Peekable}; pub use self::parsed_children::{ ParsedChildren, ParsedChildrenIntoIterator, ParsedChildrenIterator, }; pub use self::raw_syntax::{ RawSyntaxElement, RawSyntaxElementRef, RawSyntaxNode, RawSynta...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/cow_mut.rs
crates/biome_rowan/src/cow_mut.rs
#[derive(Debug)] pub(crate) enum CowMut<'a, T> { Owned(T), Borrowed(&'a mut T), } impl<T> std::ops::Deref for CowMut<'_, T> { type Target = T; fn deref(&self) -> &T { match self { CowMut::Owned(it) => it, CowMut::Borrowed(it) => it, } } } impl<T> std::ops::D...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/file_source.rs
crates/biome_rowan/src/file_source.rs
use std::fmt::Display; /// Errors around the construct of the source type #[derive(Debug)] pub enum FileSourceError { /// The path has no file name MissingFileName, /// The path has no file extension MissingFileExtension, /// The source type is unknown UnknownExtension, /// The file name is...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/macros.rs
crates/biome_rowan/src/macros.rs
use crate::{AstNode, Language}; /// Matches a `SyntaxNode` against an `ast` type. /// /// # Example: /// /// ``` /// use biome_rowan::{match_ast, AstNode}; /// use biome_rowan::raw_language::{LiteralExpression, RawLanguageRoot, RawLanguageKind, RawSyntaxTreeBuilder}; /// /// let mut builder = RawSyntaxTreeBuilder::new...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/token_text.rs
crates/biome_rowan/src/token_text.rs
use crate::GreenToken; use biome_text_size::{TextRange, TextSize}; use std::ops::Deref; use std::{borrow::Borrow, fmt::Formatter}; /// Reference to the text of a SyntaxToken without having to worry about the lifetime of `&str`. #[derive(Eq, Clone)] #[repr(C)] pub struct TokenText { // Using a green token to ensure...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/serde_impls.rs
crates/biome_rowan/src/serde_impls.rs
use serde::ser::{Serialize, SerializeMap, SerializeSeq, Serializer}; use std::fmt; use crate::{ NodeOrToken, syntax::{Language, SyntaxNode, SyntaxToken}, }; struct SerDisplay<T>(T); impl<T: fmt::Display> Serialize for SerDisplay<T> { fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> whe...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/raw_language.rs
crates/biome_rowan/src/raw_language.rs
//! Provides a sample language implementation that is useful in API explanation or tests use crate::raw_language::RawLanguageKind::{COMMA_TOKEN, LITERAL_EXPRESSION, ROOT}; use crate::{ AstNode, AstSeparatedList, Language, ParsedChildren, RawNodeSlots, RawSyntaxKind, RawSyntaxNode, SyntaxFactory, SyntaxKind, Syn...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/arc.rs
crates/biome_rowan/src/arc.rs
//! Vendored and stripped down version of triomphe use std::{ alloc::{self, Layout}, cmp::Ordering, hash::{Hash, Hasher}, marker::PhantomData, mem::{self, ManuallyDrop, offset_of}, ops::Deref, ptr::{self, NonNull}, sync::atomic::{ self, Ordering::{Acquire, Relaxed, Releas...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/cursor/node.rs
crates/biome_rowan/src/cursor/node.rs
use crate::cursor::{NodeData, SyntaxElement, SyntaxToken, SyntaxTrivia}; use crate::green::{Child, Children, GreenElementRef, Slot}; use crate::{ Direction, GreenNode, GreenNodeData, NodeOrToken, RawSyntaxKind, SyntaxNodeText, TokenAtOffset, WalkEvent, }; use biome_text_size::{TextRange, TextSize}; use std::bor...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/cursor/element.rs
crates/biome_rowan/src/cursor/element.rs
use crate::cursor::{SyntaxNode, SyntaxToken}; use crate::green::{GreenElement, GreenElementRef}; use crate::{NodeOrToken, RawSyntaxKind}; use biome_text_size::{TextRange, TextSize}; use std::iter; pub(crate) type SyntaxElement = NodeOrToken<SyntaxNode, SyntaxToken>; impl SyntaxElement { pub(super) fn new( ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/cursor/trivia.rs
crates/biome_rowan/src/cursor/trivia.rs
use crate::TriviaPiece; use crate::cursor::SyntaxToken; use crate::green::GreenTrivia; use biome_text_size::{TextRange, TextSize}; use std::fmt; use std::iter::FusedIterator; #[derive(PartialEq, Eq, Clone, Hash)] pub(crate) struct SyntaxTrivia { token: SyntaxToken, is_leading: bool, } impl SyntaxTrivia { ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/cursor/token.rs
crates/biome_rowan/src/cursor/token.rs
use crate::cursor::{NodeData, SyntaxElement, SyntaxNode, SyntaxTrivia}; use crate::green::GreenElementRef; use crate::{Direction, GreenToken, GreenTokenData, RawSyntaxKind, TokenText, WalkEvent, green}; use biome_text_size::{TextRange, TextSize}; use std::hash::{Hash, Hasher}; use std::ptr::NonNull; use std::rc::Rc; us...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/syntax_factory/raw_syntax.rs
crates/biome_rowan/src/syntax_factory/raw_syntax.rs
use crate::green::GreenElement; use crate::{GreenNode, GreenToken, NodeOrToken, SyntaxKind}; use std::marker::PhantomData; /// New-type wrapper around a `GreenNode`. /// /// Allows third-party crates to access limited information about a `GreenNode` or construct /// a `GreenNode` in a limited places. #[derive(Debug)] ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/syntax_factory/parsed_children.rs
crates/biome_rowan/src/syntax_factory/parsed_children.rs
use crate::SyntaxKind; use crate::green::GreenElement; use crate::syntax_factory::raw_syntax::{RawSyntaxElement, RawSyntaxElementRef}; use std::iter::FusedIterator; use std::marker::PhantomData; /// The parsed children of a node, not accounting for any missing children (required or optional) #[derive(Debug)] pub struc...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/syntax/node.rs
crates/biome_rowan/src/syntax/node.rs
use crate::green::GreenElement; use crate::syntax::SyntaxTrivia; use crate::syntax::element::{SyntaxElement, SyntaxElementKey}; use crate::{ AstNode, Direction, GreenNode, Language, NodeOrToken, SyntaxKind, SyntaxList, SyntaxNodeText, SyntaxToken, SyntaxTriviaPiece, TokenAtOffset, WalkEvent, cursor, }; use biom...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/syntax/element.rs
crates/biome_rowan/src/syntax/element.rs
use crate::syntax::SyntaxTrivia; use crate::{Language, NodeOrToken, SyntaxNode, SyntaxToken, cursor}; use biome_text_size::{TextRange, TextSize}; use std::iter; use std::ptr::NonNull; pub type SyntaxElement<L> = NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>; impl<L: Language> SyntaxElement<L> { pub fn key(&self) -> ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/syntax/trivia.rs
crates/biome_rowan/src/syntax/trivia.rs
use crate::{Language, SyntaxToken, cursor}; use biome_text_size::{TextRange, TextSize}; use std::fmt; use std::fmt::Formatter; use std::iter::FusedIterator; use std::marker::PhantomData; #[derive(Clone, Copy, Eq, PartialEq, Hash, Debug)] pub enum TriviaPieceKind { /// A line break (`\n`, `\r`, `\r\n`, ...) New...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/syntax/rewriter.rs
crates/biome_rowan/src/syntax/rewriter.rs
//! A module that exports utilities to rewrite a syntax trees use crate::{Language, SyntaxNode, SyntaxSlot, SyntaxToken}; /// A visitor that re-writes a syntax tree while visiting the nodes. /// /// The rewriter visits the nodes in pre-order from top-down. /// Meaning, it first visits the `root`, and then visits the ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/syntax/token.rs
crates/biome_rowan/src/syntax/token.rs
use super::trivia::{trim_leading_trivia_pieces, trim_trailing_trivia_pieces}; use crate::green::{GreenToken, GreenTrivia}; use crate::syntax::SyntaxTrivia; use crate::syntax::element::SyntaxElementKey; use crate::token_text::TokenText; use crate::{ Direction, Language, NodeOrToken, SyntaxElement, SyntaxKind, Syntax...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_rowan/src/ast/batch.rs
crates/biome_rowan/src/ast/batch.rs
use crate::syntax::SyntaxKind; use crate::{ AstNode, Language, SyntaxElement, SyntaxNode, SyntaxSlot, SyntaxToken, chain_trivia_pieces, }; use biome_text_edit::{TextEdit, TextEditBuilder}; use biome_text_size::TextRange; use std::{ cmp, collections::BinaryHeap, iter::{empty, once}, }; pub trait BatchMu...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false