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_deserialize_macros/src/deserializable_derive.rs
crates/biome_deserialize_macros/src/deserializable_derive.rs
mod container_attrs; mod enum_variant_attrs; mod struct_field_attrs; use self::container_attrs::{ContainerAttrs, UnknownFields}; use self::struct_field_attrs::DeprecatedField; use crate::deserializable_derive::enum_variant_attrs::EnumVariantAttrs; use crate::deserializable_derive::struct_field_attrs::StructFieldAttrs;...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_deserialize_macros/src/deserializable_derive/enum_variant_attrs.rs
crates/biome_deserialize_macros/src/deserializable_derive/enum_variant_attrs.rs
use quote::ToTokens; use syn::spanned::Spanned; use syn::{Attribute, Error, Lit, Meta, MetaNameValue}; use crate::util::parse_meta_list; #[derive(Clone, Debug, Default, Eq, PartialEq)] pub struct EnumVariantAttrs { /// Optional name to use in the serialized format. /// /// See also: <https://serde.rs/vari...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_deserialize_macros/src/deserializable_derive/container_attrs.rs
crates/biome_deserialize_macros/src/deserializable_derive/container_attrs.rs
use std::str::FromStr; use quote::ToTokens; use syn::spanned::Spanned; use syn::{Attribute, Error, Lit, Meta, MetaNameValue, Path}; use crate::util::parse_meta_list; /// Attributes for struct and enum. #[derive(Clone, Debug, Default, Eq, PartialEq)] pub(crate) struct ContainerAttrs { pub with_validator: bool, ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_deserialize_macros/src/deserializable_derive/struct_field_attrs.rs
crates/biome_deserialize_macros/src/deserializable_derive/struct_field_attrs.rs
use quote::ToTokens; use syn::spanned::Spanned; use syn::{Attribute, Error, Lit, Meta, MetaNameValue, Path}; use crate::util::parse_meta_list; #[derive(Clone, Debug, Default, Eq, PartialEq)] pub struct StructFieldAttrs { /// If `true`, bails on deserializing the entire struct if validation for /// this field ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_parser/src/lib.rs
crates/biome_grit_parser/src/lib.rs
#![deny(clippy::use_self)] mod constants; mod lexer; mod parser; mod token_source; use biome_grit_factory::GritSyntaxFactory; use biome_grit_syntax::{GritLanguage, GritRoot, GritSyntaxNode}; use biome_parser::tree_sink::LosslessTreeSink; use biome_parser::{AnyParse, NodeParse, diagnostic::ParseDiagnostic}; use biome_...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_parser/src/token_source.rs
crates/biome_grit_parser/src/token_source.rs
use crate::lexer::GritLexer; use biome_grit_syntax::GritSyntaxKind::{EOF, TOMBSTONE}; use biome_grit_syntax::{GritSyntaxKind, TextRange}; use biome_parser::diagnostic::ParseDiagnostic; use biome_parser::lexer::Lexer; use biome_parser::prelude::TokenSource; use biome_parser::token_source::Trivia; use biome_rowan::Trivia...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_parser/src/constants.rs
crates/biome_grit_parser/src/constants.rs
use biome_grit_syntax::GritSyntaxKind::{self, *}; use biome_grit_syntax::T; use biome_parser::{TokenSet, token_set}; // See the precedence rules defined in the Grit grammar: // https://github.com/getgrit/tree-sitter-gritql/blob/main/grammar.js#L7 pub(crate) const PRECEDENCE_NOT: isize = 0; pub(crate) const PRECEDENC...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_parser/src/parser/tests.rs
crates/biome_grit_parser/src/parser/tests.rs
#![cfg(test)] use crate::parse_grit; /// This pattern should be parseable, but previously caused explosive memory usage #[test] fn parse_language_declaration() { let code = "language js\n"; let parse = parse_grit(code); assert!(parse.diagnostics().is_empty()); }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_parser/src/parser/predicates.rs
crates/biome_grit_parser/src/parser/predicates.rs
use super::literals::{parse_boolean_literal, parse_literal}; use super::parse_name; use super::patterns::{parse_container, parse_pattern}; use super::{GritParser, parse_not}; use super::{parse_error::*, parse_maybe_named_arg}; use crate::constants::*; use biome_grit_syntax::GritSyntaxKind::{self, *}; use biome_grit_syn...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_parser/src/parser/mod.rs
crates/biome_grit_parser/src/parser/mod.rs
mod definitions; mod literals; mod parse_error; mod patterns; mod predicates; mod tests; use crate::constants::*; use crate::token_source::GritTokenSource; use biome_grit_syntax::GritSyntaxKind::{self, *}; use biome_grit_syntax::T; use biome_parser::ParserContext; use biome_parser::diagnostic::merge_diagnostics; use b...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_parser/src/parser/patterns.rs
crates/biome_grit_parser/src/parser/patterns.rs
use super::VariableList; use super::literals::*; use super::parse_error::*; use super::predicates::parse_expected_predicate; use super::{GritParser, parse_name, parse_not, parse_variable}; use super::{parse_maybe_named_arg, parse_variable_list}; use crate::constants::*; use biome_grit_syntax::GritSyntaxKind; use biome_...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_parser/src/parser/definitions.rs
crates/biome_grit_parser/src/parser/definitions.rs
use super::parse_error::{expected_definition, too_many_patterns}; use super::patterns::{PatternList, parse_pattern}; use super::predicates::PredicateList; use super::{ GritParser, VariableList, parse_language_declaration, parse_name, parse_variable_list, }; use crate::constants::*; use biome_grit_syntax::GritSyntax...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_parser/src/parser/literals.rs
crates/biome_grit_parser/src/parser/literals.rs
use super::GritParser; use super::parse_error::{expected_list_pattern, expected_map_element, expected_pattern}; use super::parse_name; use super::patterns::{parse_maybe_curly_pattern, parse_pattern}; use crate::constants::*; use biome_grit_syntax::GritSyntaxKind::{self, *}; use biome_grit_syntax::T; use biome_parser::p...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_parser/src/parser/parse_error.rs
crates/biome_grit_parser/src/parser/parse_error.rs
use super::{SUPPORTED_LANGUAGE_FLAVOR_SET_STR, SUPPORTED_LANGUAGE_SET_STR}; use crate::parser::GritParser; use biome_parser::Parser; use biome_parser::diagnostic::expected_node; use biome_parser::prelude::ParseDiagnostic; use biome_rowan::TextRange; pub(crate) fn expected_definition(p: &GritParser, range: TextRange) -...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_parser/src/lexer/tests.rs
crates/biome_grit_parser/src/lexer/tests.rs
#![cfg(test)] #![expect(unused_mut, unused_variables)] use super::{GritLexer, TextSize}; use biome_grit_syntax::GritSyntaxKind::{self, *}; use biome_parser::lexer::Lexer; use biome_rowan::TextRange; use quickcheck_macros::quickcheck; use std::sync::mpsc::channel; use std::thread; use std::time::Duration; pub struct T...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_parser/src/lexer/mod.rs
crates/biome_grit_parser/src/lexer/mod.rs
//! An extremely fast, lookup table based, GritQL lexer which yields SyntaxKind tokens used by the biome Grit parser. #[rustfmt::skip] mod tests; use crate::constants::SUPPORTED_LANGUAGE_SET_STR; use biome_grit_syntax::{GritSyntaxKind, GritSyntaxKind::*, T, TextLen, TextRange, TextSize}; use biome_parser::diagnostic:...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_parser/tests/spec_test.rs
crates/biome_grit_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_grit_parser::parse_grit; use biome_rowan::SyntaxKind; use biome_test_utils::validate_eof_token; 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_grit_parser/tests/spec_tests.rs
crates/biome_grit_parser/tests/spec_tests.rs
mod spec_test; mod ok { //! Tests that are valid GritQL tests_macros::gen_tests! {"tests/grit_test_suite/ok/*.grit", crate::spec_test::run, "ok"} } mod err { //! Tests that must fail because they are not valid GritQL tests_macros::gen_tests! {"tests/grit_test_suite/err/*.grit", 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_markdown_parser/src/lib.rs
crates/biome_markdown_parser/src/lib.rs
#![deny(clippy::use_self)] use biome_markdown_factory::MarkdownSyntaxFactory; use biome_markdown_syntax::{MarkdownLanguage, MarkdownSyntaxNode, MdDocument}; use biome_parser::{prelude::ParseDiagnostic, tree_sink::LosslessTreeSink}; use biome_rowan::{AstNode, NodeCache}; use parser::MarkdownParser; use syntax::parse_do...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_markdown_parser/src/token_source.rs
crates/biome_markdown_parser/src/token_source.rs
use crate::lexer::{MarkdownLexContext, MarkdownLexer, MarkdownReLexContext}; use biome_markdown_syntax::MarkdownSyntaxKind; use biome_markdown_syntax::MarkdownSyntaxKind::EOF; use biome_parser::lexer::BufferedLexer; use biome_parser::prelude::{BumpWithContext, TokenSource}; use biome_parser::token_source::{TokenSourceW...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_markdown_parser/src/parser.rs
crates/biome_markdown_parser/src/parser.rs
use biome_markdown_syntax::MarkdownSyntaxKind; use biome_parser::ParserContext; use biome_parser::event::Event; use biome_parser::prelude::*; use biome_parser::token_source::Trivia; use biome_parser::{ParserContextCheckpoint, diagnostic::merge_diagnostics}; use crate::token_source::{MarkdownTokenSource, MarkdownTokenS...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_markdown_parser/src/syntax.rs
crates/biome_markdown_parser/src/syntax.rs
pub mod thematic_break_block; use biome_markdown_syntax::{T, kind::MarkdownSyntaxKind::*}; use biome_parser::{ Parser, prelude::ParsedSyntax::{self, *}, }; use thematic_break_block::{at_thematic_break_block, parse_thematic_break_block}; use crate::MarkdownParser; pub(crate) fn parse_document(p: &mut Markdown...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_markdown_parser/src/syntax/thematic_break_block.rs
crates/biome_markdown_parser/src/syntax/thematic_break_block.rs
use crate::parser::MarkdownParser; use biome_markdown_syntax::MarkdownSyntaxKind::*; use biome_parser::{ Parser, prelude::ParsedSyntax::{self, *}, }; pub(crate) fn at_thematic_break_block(p: &mut MarkdownParser) -> bool { p.at(MD_THEMATIC_BREAK_LITERAL) } pub(crate) fn parse_thematic_break_block(p: &mut M...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_markdown_parser/src/lexer/tests.rs
crates/biome_markdown_parser/src/lexer/tests.rs
#![cfg(test)] #![expect(unused_mut, unused_variables)] use super::{MarkdownLexer, TextSize}; use crate::lexer::MarkdownLexContext; use biome_markdown_syntax::MarkdownSyntaxKind::*; use biome_parser::lexer::Lexer; use quickcheck_macros::quickcheck; use std::sync::mpsc::channel; use std::thread; use std::time::Duration;...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_markdown_parser/src/lexer/mod.rs
crates/biome_markdown_parser/src/lexer/mod.rs
//! An extremely fast, lookup table based, JSON lexer which yields SyntaxKind tokens used by the rome-json parser. #[rustfmt::skip] mod tests; use biome_markdown_syntax::MarkdownSyntaxKind; use biome_markdown_syntax::MarkdownSyntaxKind::*; use biome_parser::diagnostic::ParseDiagnostic; use biome_parser::lexer::{ ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_markdown_parser/tests/spec_test.rs
crates/biome_markdown_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_markdown_parser::parse_markdown; use biome_rowan::SyntaxKind; use biome_test_utils::{has_bogus_nodes_or_empty_slot...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_markdown_parser/tests/spec_tests.rs
crates/biome_markdown_parser/tests/spec_tests.rs
mod spec_test; mod ok { tests_macros::gen_tests! {"tests/md_test_suite/ok/**/*.md", crate::spec_test::run, "ok"} tests_macros::gen_tests! {"tests/md_test_suite/error/**/*.md", crate::spec_test::run, "error"} }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_string_case/src/lib.rs
crates/biome_string_case/src/lib.rs
//! Identify string case and convert to various string cases. #![deny(clippy::use_self)] use std::{borrow::Cow, cmp::Ordering, ffi::OsStr}; #[cfg(feature = "biome_rowan")] pub mod comparable_token; /// Represents the case of a string. /// /// Note that some cases are supersets of others. /// For example, a name in ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_string_case/src/comparable_token.rs
crates/biome_string_case/src/comparable_token.rs
use std::cmp::Ordering; use biome_rowan::TokenText; use crate::StrLikeExtension; /// A [TokenText] that is ordered according to the ASCII natural order using [crate::CldrAsciiCollator]. #[derive(Clone, Debug)] pub struct ComparableToken { pub token: TokenText, } impl ComparableToken { pub const fn new(token:...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_migrate/src/services.rs
crates/biome_migrate/src/services.rs
use biome_analyze::{FromServices, RuleKey, RuleMetadata, ServiceBag, ServicesDiagnostic}; use std::ops::Deref; use std::sync::Arc; #[derive(Debug)] pub(crate) struct IsRoot(pub bool); impl IsRoot { pub fn is_root(&self) -> bool { self.0 } } impl FromServices for IsRoot { fn from_services( ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_migrate/src/lib.rs
crates/biome_migrate/src/lib.rs
#![deny(clippy::use_self)] mod analyzers; mod macros; mod registry; mod services; use crate::registry::visit_migration_registry; use crate::services::IsRoot; pub use biome_analyze::ControlFlow; use biome_analyze::{ AnalysisFilter, Analyzer, AnalyzerContext, AnalyzerOptions, AnalyzerSignal, ApplySuppression, I...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_migrate/src/macros.rs
crates/biome_migrate/src/macros.rs
#[macro_export] macro_rules! declare_migration { ( $vis:vis $id:ident { version: $version:literal, name: $name:tt, $( $key:ident: $value:expr, )* } ) => { $vis enum $id {} impl biome_analyze::RuleMeta for $id { type Group = $crate::analyzers::MigrationGroup;...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_migrate/src/registry.rs
crates/biome_migrate/src/registry.rs
use crate::analyzers::MigrationCategory; use biome_analyze::RegistryVisitor; use biome_json_syntax::JsonLanguage; pub fn visit_migration_registry<V: RegistryVisitor<JsonLanguage>>(registry: &mut V) { registry.record_category::<MigrationCategory>(); }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_migrate/src/analyzers.rs
crates/biome_migrate/src/analyzers.rs
use crate::analyzers::all::RulesAll; use crate::analyzers::ignore_scanner::IgnoreScanner; use crate::analyzers::includes::Includes; use crate::analyzers::monorepo::Monorepo; use crate::analyzers::no_restriected_globals::NoRestrictedGlobals; use crate::analyzers::organize_imports::OrganizeImports; use crate::analyzers::...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_migrate/src/analyzers/includes.rs
crates/biome_migrate/src/analyzers/includes.rs
use std::str::FromStr; use crate::{MigrationAction, declare_migration}; use biome_analyze::context::RuleContext; use biome_analyze::{Ast, Rule, RuleAction, RuleDiagnostic}; use biome_console::markup; use biome_diagnostics::{Applicability, category}; use biome_json_factory::make; use biome_json_syntax::{AnyJsonValue, J...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_migrate/src/analyzers/ignore_scanner.rs
crates/biome_migrate/src/analyzers/ignore_scanner.rs
use crate::declare_migration; use biome_analyze::context::RuleContext; use biome_analyze::{Ast, Rule, RuleAction, RuleDiagnostic}; use biome_console::markup; use biome_diagnostics::{Applicability, category}; use biome_json_factory::make::{ json_array_element_list, json_array_value, json_member, json_member_list, js...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_migrate/src/analyzers/all.rs
crates/biome_migrate/src/analyzers/all.rs
use crate::{MigrationAction, declare_migration}; use biome_analyze::context::RuleContext; use biome_analyze::{Ast, Rule, RuleAction, RuleDiagnostic}; use biome_console::markup; use biome_diagnostics::{Applicability, category}; use biome_json_syntax::{JsonMember, T}; use biome_rowan::{AstNode, BatchMutationExt, SyntaxEl...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_migrate/src/analyzers/trailing_comma.rs
crates/biome_migrate/src/analyzers/trailing_comma.rs
use crate::{MigrationAction, declare_migration}; use biome_analyze::context::RuleContext; use biome_analyze::{Ast, Rule, RuleAction, RuleDiagnostic}; use biome_console::markup; use biome_diagnostics::{Applicability, category}; use biome_json_factory::make::{json_member_name, json_string_literal}; use biome_json_syntax:...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_migrate/src/analyzers/no_restriected_globals.rs
crates/biome_migrate/src/analyzers/no_restriected_globals.rs
use biome_analyze::context::RuleContext; use biome_analyze::{Ast, Rule, RuleAction, RuleDiagnostic}; use biome_console::markup; use biome_diagnostics::{Applicability, category}; use biome_json_factory::make; use biome_json_syntax::{ AnyJsonValue, JsonArrayValue, JsonLanguage, JsonMember, JsonMemberList, T, }; use b...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_migrate/src/analyzers/organize_imports.rs
crates/biome_migrate/src/analyzers/organize_imports.rs
use crate::{MigrationAction, declare_migration}; use biome_analyze::context::RuleContext; use biome_analyze::{Ast, Rule, RuleAction, RuleDiagnostic}; use biome_console::markup; use biome_diagnostics::{Applicability, category}; use biome_json_factory::make; use biome_json_syntax::{AnyJsonValue, JsonMember, JsonRoot, T};...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_migrate/src/analyzers/schema.rs
crates/biome_migrate/src/analyzers/schema.rs
use crate::{MigrationAction, declare_migration}; use biome_analyze::context::RuleContext; use biome_analyze::{Ast, Rule, RuleAction, RuleDiagnostic}; use biome_console::markup; use biome_diagnostics::{Applicability, category}; use biome_json_factory::make::{ident, json_string_value}; use biome_json_syntax::{JsonMember,...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_migrate/src/analyzers/rule_mover.rs
crates/biome_migrate/src/analyzers/rule_mover.rs
use std::str::FromStr; use biome_analyze::{ Ast, FixKind, QueryMatch, Rule, RuleDiagnostic, context::RuleContext, utils::fix_separators, }; use biome_configuration::analyzer::{ RuleGroup, RuleName, assist::{self, ActionName}, }; use biome_console::markup; use biome_diagnostics::category; use biome_json_fac...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_migrate/src/analyzers/use_naming_convention_enum_member_case.rs
crates/biome_migrate/src/analyzers/use_naming_convention_enum_member_case.rs
use crate::{MigrationAction, declare_migration}; use biome_analyze::context::RuleContext; use biome_analyze::{Ast, Rule, RuleAction, RuleDiagnostic}; use biome_console::markup; use biome_diagnostics::{Applicability, category}; use biome_json_factory::make; use biome_json_syntax::{AnyJsonValue, JsonMember, JsonMemberLis...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_migrate/src/analyzers/monorepo.rs
crates/biome_migrate/src/analyzers/monorepo.rs
use crate::declare_migration; use crate::services::IsRoot; use biome_analyze::context::RuleContext; use biome_analyze::{Ast, Rule, RuleAction, RuleDiagnostic}; use biome_console::markup; use biome_diagnostics::{Applicability, category}; use biome_json_factory::make::{ json_boolean_value, json_member, json_member_li...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_migrate/tests/spec_tests.rs
crates/biome_migrate/tests/spec_tests.rs
use biome_analyze::{AnalysisFilter, AnalyzerAction, ControlFlow, Never, RuleFilter}; use biome_diagnostics::advice::CodeSuggestionAdvice; use biome_diagnostics::{DiagnosticExt, Severity}; use biome_json_parser::{JsonParserOptions, parse_json}; use biome_json_syntax::JsonLanguage; use biome_rowan::AstNode; use biome_tes...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_syntax/src/lib.rs
crates/biome_tailwind_syntax/src/lib.rs
#![deny(clippy::use_self)] #[macro_use] mod generated; pub mod metadata; mod syntax_node; pub use self::generated::*; pub use biome_rowan::{TextLen, TextRange, TextSize, TokenAtOffset, TriviaPieceKind, WalkEvent}; pub use syntax_node::*; use crate::TailwindSyntaxKind::{ TW_BOGUS, TW_BOGUS_CANDIDATE, TW_BOGUS_MOD...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_syntax/src/syntax_node.rs
crates/biome_tailwind_syntax/src/syntax_node.rs
//! This module defines the Concrete Syntax Tree used by Biome. //! //! The tree is entirely lossless, whitespace, comments, and errors are preserved. //! It also provides traversal methods including parent, children, and siblings of nodes. //! //! This is a simple wrapper around the `rowan` crate which does most of th...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_syntax/src/metadata.rs
crates/biome_tailwind_syntax/src/metadata.rs
/// Base names that will parse wrong because they contain dashes. pub static BASENAMES_WITH_DASHES: &[&str] = &[ "any-pointer", "auto-cols", "auto-rows", "backdrop-blur", "backdrop-brightness", "backdrop-contrast", "backdrop-filter", "backdrop-grayscale", "backdrop-hue-rotate", "...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_syntax/src/generated.rs
crates/biome_tailwind_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_tailwind_syntax/src/generated/nodes_mut.rs
crates/biome_tailwind_syntax/src/generated/nodes_mut.rs
//! Generated file, do not edit by hand, see `xtask/codegen` use crate::{TailwindSyntaxToken as SyntaxToken, generated::nodes::*}; use biome_rowan::AstNode; use std::iter::once; impl TwArbitraryCandidate { pub fn with_l_brack_token(self, element: SyntaxToken) -> Self { Self::unwrap_cast( self.s...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_syntax/src/generated/kind.rs
crates/biome_tailwind_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 TailwindSyntaxKind { #[doc(hid...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_syntax/src/generated/macros.rs
crates/biome_tailwind_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_tailwind_syntax/src/generated/nodes.rs
crates/biome_tailwind_syntax/src/generated/nodes.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #![allow(dead_code)] #![allow(unused)] use crate::{ TailwindLanguage as Language, TailwindSyntaxElement as SyntaxElement, TailwindSyntaxElementChildren as SyntaxElementChildren, TailwindSyntaxKind::{self as SyntaxKind, *}, TailwindSyntaxList ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_factory/src/lib.rs
crates/biome_json_factory/src/lib.rs
#![deny(clippy::use_self)] use biome_json_syntax::JsonLanguage; use biome_rowan::TreeBuilder; mod generated; pub use crate::generated::JsonSyntaxFactory; pub mod make; // Re-exported for tests #[doc(hidden)] pub use biome_json_syntax as syntax; pub type JsonSyntaxTreeBuilder = TreeBuilder<'static, JsonLanguage, Jso...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_factory/src/make.rs
crates/biome_json_factory/src/make.rs
use biome_json_syntax::{JsonSyntaxKind, JsonSyntaxToken}; pub use crate::generated::node_factory::*; pub fn ident(text: &str) -> JsonSyntaxToken { JsonSyntaxToken::new_detached(JsonSyntaxKind::IDENT, text, [], []) } /// Create a new token with the specified syntax kind and no attached trivia pub fn token(kind: J...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_factory/src/generated.rs
crates/biome_json_factory/src/generated.rs
#[rustfmt::skip] pub(super) mod syntax_factory; #[rustfmt::skip] pub mod node_factory; pub use syntax_factory::JsonSyntaxFactory;
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_factory/src/generated/syntax_factory.rs
crates/biome_json_factory/src/generated/syntax_factory.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #![allow(unused_mut)] use biome_json_syntax::{JsonSyntaxKind, JsonSyntaxKind::*, T, *}; use biome_rowan::{ AstNode, ParsedChildren, RawNodeSlots, RawSyntaxNode, SyntaxFactory, SyntaxKind, }; #[derive(Debug)] pub struct JsonSyntaxFactory; impl SyntaxFacto...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_factory/src/generated/node_factory.rs
crates/biome_json_factory/src/generated/node_factory.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #![allow(clippy::redundant_closure)] use biome_json_syntax::{ JsonSyntaxElement as SyntaxElement, JsonSyntaxNode as SyntaxNode, JsonSyntaxToken as SyntaxToken, *, }; use biome_rowan::AstNode; pub fn json_array_value( l_brack_token: SyntaxToken, ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/grit_code_snippet.rs
crates/biome_grit_patterns/src/grit_code_snippet.rs
use crate::grit_context::{GritExecContext, GritQueryContext}; use crate::grit_resolved_pattern::GritResolvedPattern; use crate::grit_target_node::GritTargetSyntaxKind; use biome_js_syntax::JsSyntaxKind; use grit_pattern_matcher::binding::Binding; use grit_pattern_matcher::context::ExecContext; use grit_pattern_matcher:...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/errors.rs
crates/biome_grit_patterns/src/errors.rs
use std::fmt::Debug; use biome_console::{fmt::Formatter, markup}; use biome_diagnostics::Location; use biome_diagnostics::{Category, Diagnostic, LogCategory, Severity, category}; use biome_parser::diagnostic::ParseDiagnostic; use biome_rowan::SyntaxError; use grit_util::ByteRange; #[derive(Debug)] pub enum CompileErr...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/variables.rs
crates/biome_grit_patterns/src/variables.rs
use crate::grit_context::GritQueryContext; use grit_pattern_matcher::pattern::{VariableContent, VariableSource}; use grit_util::VariableBinding; /// List of all variable locations in a query. /// /// Variables are stored in a vector of vectors, where the outer vector is used /// to separate scopes, while the inner vec...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/diagnostics.rs
crates/biome_grit_patterns/src/diagnostics.rs
use biome_diagnostics::Diagnostic; use biome_rowan::TextRange; #[derive(Clone, Debug, Diagnostic)] #[diagnostic(severity = Warning)] pub struct CompilerDiagnostic { #[message] #[description] message: String, #[location(span)] range: TextRange, } impl CompilerDiagnostic { pub(crate) fn new_war...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/grit_context.rs
crates/biome_grit_patterns/src/grit_context.rs
use crate::grit_binding::GritBinding; use crate::grit_built_in_functions::BuiltIns; use crate::grit_code_snippet::GritCodeSnippet; use crate::grit_file::GritFile; use crate::grit_node_patterns::{GritLeafNodePattern, GritNodePattern}; use crate::grit_resolved_pattern::GritResolvedPattern; use crate::grit_target_language...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/lib.rs
crates/biome_grit_patterns/src/lib.rs
#![deny(clippy::use_self)] mod diagnostics; mod errors; mod grit_analysis_ext; mod grit_binding; mod grit_built_in_functions; mod grit_code_snippet; mod grit_context; mod grit_css_parser; mod grit_definitions; mod grit_file; mod grit_js_parser; mod grit_node; mod grit_node_patterns; mod grit_query; mod grit_resolved_p...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/grit_file.rs
crates/biome_grit_patterns/src/grit_file.rs
use std::path::Path; use crate::grit_context::GritQueryContext; use crate::grit_resolved_pattern::GritResolvedPattern; use crate::grit_target_language::GritTargetLanguage; use grit_pattern_matcher::{ constant::Constant, pattern::{File, FilePtr, FileRegistry, ResolvedFile, ResolvedPattern}, }; use grit_util::{A...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/parse.rs
crates/biome_grit_patterns/src/parse.rs
use crate::{GritPattern, ParseError}; use grit_pattern_matcher::pattern::Pattern; pub fn parse_pattern(source: String) -> Result<GritPattern, ParseError> { Ok(GritPattern { _pattern: Pattern::Undefined, source, }) }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/grit_target_language.rs
crates/biome_grit_patterns/src/grit_target_language.rs
mod css_target_language; mod js_target_language; pub use css_target_language::CssTargetLanguage; pub use js_target_language::JsTargetLanguage; use camino::Utf8Path; use grit_util::{AnalysisLogs, Ast, CodeRange, EffectRange, Language, Parser, SnippetTree}; use std::borrow::Cow; use std::path::Path; use std::str::FromS...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/grit_resolved_pattern.rs
crates/biome_grit_patterns/src/grit_resolved_pattern.rs
use crate::GritTargetLanguage; use crate::grit_code_snippet::GritCodeSnippet; use crate::grit_context::GritExecContext; use crate::grit_file::GritFile; use crate::grit_target_node::GritTargetNode; use crate::grit_tree::GritTargetTree; use crate::{grit_binding::GritBinding, grit_context::GritQueryContext}; use grit_patt...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/grit_js_parser.rs
crates/biome_grit_patterns/src/grit_js_parser.rs
use crate::{ grit_analysis_ext::GritAnalysisExt, grit_target_language::GritTargetParser, grit_tree::GritTargetTree, }; use biome_js_parser::{JsParserOptions, parse}; use biome_js_syntax::{JsFileSource, JsLanguage}; use biome_parser::AnyParse; use camino::Utf8Path; use grit_util::{AnalysisLogs, FileOrigin, Parse...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/pattern_compiler.rs
crates/biome_grit_patterns/src/pattern_compiler.rs
pub(crate) mod compilation_context; /// Creates a new scope within the given `context`. /// /// This is implemented as a macro instead of method to avoid capturing the /// entire `context` instance, which would run afoul of the borrow-checking due /// to its mutable references. macro_rules! create_scope { ($contex...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/util.rs
crates/biome_grit_patterns/src/util.rs
use biome_rowan::TextRange; use grit_util::{ByteRange, CodeRange}; pub trait TextRangeGritExt { fn to_byte_range(&self) -> ByteRange; fn to_code_range(&self, source: &str) -> CodeRange; } impl TextRangeGritExt for TextRange { fn to_byte_range(&self) -> ByteRange { ByteRange::new(self.start().into...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/grit_node.rs
crates/biome_grit_patterns/src/grit_node.rs
use crate::util::TextRangeGritExt; use biome_grit_syntax::GritSyntaxNode; use grit_util::{AstCursor, AstNode as GritAstNode, ByteRange, CodeRange, error::GritResult}; use std::{borrow::Cow, ops::Deref}; /// Wrapper around `GritSyntaxNode` as produced by our internal Grit parser. /// /// This enables us to implement th...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/grit_definitions.rs
crates/biome_grit_patterns/src/grit_definitions.rs
use std::collections::BTreeMap; use crate::{ CompileError, grit_context::GritQueryContext, pattern_compiler::{ FunctionDefinitionCompiler, PatternDefinitionCompiler, PredicateDefinitionCompiler, compilation_context::{DefinitionInfo, NodeCompilationContext}, }, util::TextRangeGritExt...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/source_location_ext.rs
crates/biome_grit_patterns/src/source_location_ext.rs
use biome_diagnostics::display::{SourceFile, SourceLocation}; use biome_rowan::TextRange; use grit_util::{Position, Range}; pub trait SourceFileExt { fn to_grit_range(&self, range: TextRange) -> Option<Range>; } impl SourceFileExt for SourceFile<'_> { fn to_grit_range(&self, range: TextRange) -> Option<Range>...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/grit_analysis_ext.rs
crates/biome_grit_patterns/src/grit_analysis_ext.rs
use biome_diagnostics::{Diagnostic, PrintDescription, Severity, display::SourceFile}; use grit_util::AnalysisLog; use std::path::{Path, PathBuf}; use crate::source_location_ext::SourceFileExt; pub trait GritAnalysisExt { fn to_log(&self, path: Option<&Path>) -> AnalysisLog; } impl<T> GritAnalysisExt for T where ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/grit_target_node.rs
crates/biome_grit_patterns/src/grit_target_node.rs
use crate::grit_tree::GritTargetTree; use crate::util::TextRangeGritExt; use biome_css_syntax::{CssSyntaxKind, CssSyntaxNode, CssSyntaxToken}; use biome_js_syntax::{JsSyntaxKind, JsSyntaxNode, JsSyntaxToken}; use biome_rowan::{NodeOrToken, SyntaxKind, SyntaxSlot, TextRange}; use grit_util::{AstCursor, AstNode as GritAs...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/grit_query.rs
crates/biome_grit_patterns/src/grit_query.rs
use crate::diagnostics::CompilerDiagnostic; use crate::grit_built_in_functions::BuiltIns; use crate::grit_context::{GritExecContext, GritQueryContext, GritTargetFile}; use crate::grit_definitions::{ Definitions, ScannedDefinitionInfo, compile_definitions, scan_definitions, }; use crate::grit_resolved_pattern::GritR...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/grit_built_in_functions.rs
crates/biome_grit_patterns/src/grit_built_in_functions.rs
use crate::{ grit_context::{GritExecContext, GritQueryContext}, grit_resolved_pattern::GritResolvedPattern, }; use biome_string_case::StrOnlyExtension; use grit_pattern_matcher::{ binding::Binding, constant::Constant, context::ExecContext, pattern::{ CallBuiltIn, CallbackPattern, JoinFn,...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/grit_node_patterns.rs
crates/biome_grit_patterns/src/grit_node_patterns.rs
use crate::grit_context::{GritExecContext, GritQueryContext}; use crate::grit_resolved_pattern::GritResolvedPattern; use crate::grit_target_language::LeafEquivalenceClass; use crate::grit_target_node::{GritTargetNode, GritTargetSyntaxKind}; use crate::{CompileError, GritTargetLanguage}; use grit_pattern_matcher::bindin...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/grit_tree.rs
crates/biome_grit_patterns/src/grit_tree.rs
use crate::grit_target_node::{GritTargetLanguageNode, GritTargetNode}; use grit_util::Ast; use std::borrow::Cow; #[derive(Clone, Debug, PartialEq)] pub struct GritTargetTree { root: GritTargetLanguageNode, source: String, } impl GritTargetTree { pub fn new(root: GritTargetLanguageNode) -> Self { l...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/grit_css_parser.rs
crates/biome_grit_patterns/src/grit_css_parser.rs
use crate::{ grit_analysis_ext::GritAnalysisExt, grit_target_language::GritTargetParser, grit_tree::GritTargetTree, }; use biome_css_parser::{CssParserOptions, parse_css}; use biome_css_syntax::CssLanguage; use biome_parser::AnyParse; use camino::Utf8Path; use grit_util::{AnalysisLogs, FileOrigin, Parser, Snipp...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/grit_binding.rs
crates/biome_grit_patterns/src/grit_binding.rs
use crate::{ grit_context::GritQueryContext, grit_target_language::GritTargetLanguage, grit_target_node::GritTargetNode, source_location_ext::SourceFileExt, util::TextRangeGritExt, }; use biome_diagnostics::{SourceCode, display::SourceFile}; use biome_rowan::TextRange; use grit_pattern_matcher::{ binding::B...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/pattern_compiler/every_compiler.rs
crates/biome_grit_patterns/src/pattern_compiler/every_compiler.rs
use super::{PatternCompiler, compilation_context::NodeCompilationContext}; use crate::{CompileError, grit_context::GritQueryContext}; use biome_grit_syntax::GritEvery; use grit_pattern_matcher::pattern::Every; pub(crate) struct EveryCompiler; impl EveryCompiler { pub(crate) fn from_node( node: &GritEvery,...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/pattern_compiler/predicate_definition_compiler.rs
crates/biome_grit_patterns/src/pattern_compiler/predicate_definition_compiler.rs
use super::{and_compiler::PrAndCompiler, compilation_context::NodeCompilationContext}; use crate::{CompileError, grit_context::GritQueryContext}; use biome_grit_syntax::GritPredicateDefinition; use biome_rowan::AstNode; use grit_pattern_matcher::pattern::{Predicate, PredicateDefinition}; use std::collections::BTreeMap;...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/pattern_compiler/multiply_compiler.rs
crates/biome_grit_patterns/src/pattern_compiler/multiply_compiler.rs
use super::{PatternCompiler, compilation_context::NodeCompilationContext}; use crate::{CompileError, grit_context::GritQueryContext}; use biome_grit_syntax::GritMulOperation; use grit_pattern_matcher::pattern::Multiply; pub(crate) struct MultiplyCompiler; impl MultiplyCompiler { pub(crate) fn from_node( n...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/pattern_compiler/rewrite_compiler.rs
crates/biome_grit_patterns/src/pattern_compiler/rewrite_compiler.rs
use super::{ PatternCompiler, compilation_context::NodeCompilationContext, variable_compiler::VariableCompiler, }; use crate::{ CompileError, diagnostics::CompilerDiagnostic, grit_code_snippet::GritCodeSnippet, grit_context::GritQueryContext, }; use biome_grit_syntax::{GritPredicateRewrite, GritRewrite,...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/pattern_compiler/accumulate_compiler.rs
crates/biome_grit_patterns/src/pattern_compiler/accumulate_compiler.rs
use super::{ PatternCompiler, compilation_context::NodeCompilationContext, variable_compiler::VariableCompiler, }; use crate::{CompileError, grit_code_snippet::GritCodeSnippet, grit_context::GritQueryContext}; use biome_grit_syntax::{GritPatternAccumulate, GritPredicateAccumulate}; use grit_pattern_matcher::pat...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/pattern_compiler/step_compiler.rs
crates/biome_grit_patterns/src/pattern_compiler/step_compiler.rs
use super::{ PatternCompiler, auto_wrap::wrap_pattern_in_before_and_after_each_file, compilation_context::NodeCompilationContext, }; use crate::{CompileError, diagnostics::CompilerDiagnostic, grit_context::GritQueryContext}; use biome_grit_syntax::AnyGritPattern; use biome_rowan::AstNode; use grit_pattern_match...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/pattern_compiler/list_index_compiler.rs
crates/biome_grit_patterns/src/pattern_compiler/list_index_compiler.rs
use super::{ compilation_context::NodeCompilationContext, container_compiler::ContainerCompiler, list_compiler::ListCompiler, }; use crate::{CompileError, grit_context::GritQueryContext}; use biome_grit_syntax::{AnyGritListAccessorSubject, AnyGritListIndex, GritListAccessor}; use grit_pattern_matcher::pattern::...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/pattern_compiler/literal_compiler.rs
crates/biome_grit_patterns/src/pattern_compiler/literal_compiler.rs
use super::{ compilation_context::NodeCompilationContext, list_compiler::ListCompiler, map_compiler::MapCompiler, snippet_compiler::parse_snippet_content, }; use crate::{ CompileError, GritTargetLanguage, grit_context::GritQueryContext, util::TextRangeGritExt, }; use biome_grit_syntax::{AnyGritCodeSnippetSo...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/pattern_compiler/add_compiler.rs
crates/biome_grit_patterns/src/pattern_compiler/add_compiler.rs
use super::{PatternCompiler, compilation_context::NodeCompilationContext}; use crate::{CompileError, grit_context::GritQueryContext}; use biome_grit_syntax::GritAddOperation; use grit_pattern_matcher::pattern::Add; pub(crate) struct AddCompiler; impl AddCompiler { pub(crate) fn from_node( node: &GritAddOp...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/pattern_compiler/or_compiler.rs
crates/biome_grit_patterns/src/pattern_compiler/or_compiler.rs
use super::{ PatternCompiler, compilation_context::NodeCompilationContext, predicate_compiler::PredicateCompiler, }; use crate::{CompileError, grit_context::GritQueryContext}; use biome_grit_syntax::{GritPatternOr, GritPredicateOr}; use grit_pattern_matcher::pattern::{Or, PrOr}; pub(crate) struct OrCompiler; ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/pattern_compiler/as_compiler.rs
crates/biome_grit_patterns/src/pattern_compiler/as_compiler.rs
use super::{ PatternCompiler, compilation_context::NodeCompilationContext, snippet_compiler::split_snippet, variable_compiler::VariableCompiler, }; use crate::{ CompileError, diagnostics::CompilerDiagnostic, grit_context::GritQueryContext, grit_node::GritNode, }; use biome_grit_syntax::{AnyGritPattern, ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/pattern_compiler/equal_compiler.rs
crates/biome_grit_patterns/src/pattern_compiler/equal_compiler.rs
use super::{ PatternCompiler, compilation_context::NodeCompilationContext, variable_compiler::VariableCompiler, }; use crate::{CompileError, grit_context::GritQueryContext}; use biome_grit_syntax::GritPredicateEqual; use grit_pattern_matcher::pattern::Equal; pub(crate) struct PrEqualCompiler; impl PrEqualComp...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/pattern_compiler/predicate_compiler.rs
crates/biome_grit_patterns/src/pattern_compiler/predicate_compiler.rs
use super::{ accumulate_compiler::PrAccumulateCompiler, and_compiler::PrAndCompiler, any_compiler::PrAnyCompiler, assignment_compiler::PrAssignmentCompiler, compilation_context::NodeCompilationContext, equal_compiler::PrEqualCompiler, if_compiler::PrIfCompiler, match_compiler::PrMatchCompiler, maybe_com...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/pattern_compiler/divide_compiler.rs
crates/biome_grit_patterns/src/pattern_compiler/divide_compiler.rs
use super::{PatternCompiler, compilation_context::NodeCompilationContext}; use crate::{CompileError, grit_context::GritQueryContext}; use biome_grit_syntax::GritDivOperation; use grit_pattern_matcher::pattern::Divide; pub(crate) struct DivideCompiler; impl DivideCompiler { pub(crate) fn from_node( node: &...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs
crates/biome_grit_patterns/src/pattern_compiler/auto_wrap.rs
use super::compilation_context::{DefinitionInfo, NodeCompilationContext}; use crate::CompileError; use grit_pattern_matcher::constants::{GRIT_RANGE_VAR, MATCH_VAR}; use grit_pattern_matcher::context::QueryContext; use grit_pattern_matcher::pattern::{ And, Bubble, Call, Container, Contains, FilePattern, Includes, Li...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/pattern_compiler/list_compiler.rs
crates/biome_grit_patterns/src/pattern_compiler/list_compiler.rs
use super::{PatternCompiler, compilation_context::NodeCompilationContext}; use crate::{CompileError, grit_context::GritQueryContext}; use biome_grit_syntax::{AnyGritListPattern, GritList}; use grit_pattern_matcher::pattern::{List, Pattern}; pub(crate) struct ListCompiler; impl ListCompiler { pub(crate) fn from_no...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/pattern_compiler/snippet_compiler.rs
crates/biome_grit_patterns/src/pattern_compiler/snippet_compiler.rs
use super::compilation_context::NodeCompilationContext; use crate::{ CompileError, GritTargetLanguage, grit_code_snippet::GritCodeSnippet, grit_context::GritQueryContext, grit_node_patterns::{GritLeafNodePattern, GritNodePattern, GritNodePatternArg}, grit_target_node::{GritSyntaxSlot, GritTargetNode...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_grit_patterns/src/pattern_compiler/map_accessor_compiler.rs
crates/biome_grit_patterns/src/pattern_compiler/map_accessor_compiler.rs
use super::{ compilation_context::NodeCompilationContext, container_compiler::ContainerCompiler, map_compiler::MapCompiler, variable_compiler::VariableCompiler, }; use crate::{CompileError, grit_context::GritQueryContext}; use biome_grit_syntax::{AnyGritMapAccessorSubject, AnyGritMapKey, GritMapAccessor}; use b...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false