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
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_syntax/src/type_ext.rs
crates/rome_js_syntax/src/type_ext.rs
use std::iter; use crate::AnyTsType; impl AnyTsType { /// Try to extract non `TsParenthesizedType` from `AnyTsType` pub fn omit_parentheses(self) -> AnyTsType { let first = self.as_ts_parenthesized_type().and_then(|x| x.ty().ok()); iter::successors(first, |x| { let parenthesized = ...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_syntax/src/numbers.rs
crates/rome_js_syntax/src/numbers.rs
//! JS Number parsing. use std::str::FromStr; /// Split given string into radix and number string. /// /// It also removes any underscores. pub fn split_into_radix_and_number(num: &str) -> (u32, String) { let (radix, raw) = parse_js_number_prefix(num).unwrap_or((10, num)); let raw = raw.replace('_', ""); ...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_syntax/src/parameter_ext.rs
crates/rome_js_syntax/src/parameter_ext.rs
use crate::{ AnyJsBindingPattern, AnyJsConstructorParameter, AnyJsFormalParameter, AnyJsParameter, JsConstructorParameterList, JsConstructorParameters, JsDecoratorList, JsLanguage, JsParameterList, JsParameters, }; use rome_rowan::{ declare_node_union, AstNodeList, AstSeparatedList, AstSeparatedListNode...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_syntax/src/union_ext.rs
crates/rome_js_syntax/src/union_ext.rs
use crate::{ AnyJsArrowFunctionParameters, AnyJsBinding, AnyJsClass, AnyJsClassMember, AnyJsClassMemberName, AnyJsFunction, AnyJsFunctionBody, AnyTsPropertyAnnotation, AnyTsVariableAnnotation, JsClassMemberList, JsDecoratorList, JsExtendsClause, JsSyntaxToken, TsImplementsClause, TsReturnTypeAnnotation,...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_syntax/src/expr_ext.rs
crates/rome_js_syntax/src/expr_ext.rs
//! Extensions for things which are not easily generated in ast expr nodes use crate::numbers::parse_js_number; use crate::static_value::StaticValue; use crate::{ inner_string_text, AnyJsCallArgument, AnyJsExpression, AnyJsLiteralExpression, AnyJsObjectMemberName, AnyJsTemplateElement, JsArrayExpression, JsArra...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
true
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_syntax/src/static_value.rs
crates/rome_js_syntax/src/static_value.rs
use rome_rowan::TextRange; use crate::{JsSyntaxKind, JsSyntaxToken}; #[derive(Debug, Clone, Eq, PartialEq)] /// static values defined in JavaScript's expressions pub enum StaticValue { Boolean(JsSyntaxToken), Null(JsSyntaxToken), Undefined(JsSyntaxToken), Number(JsSyntaxToken), BigInt(JsSyntaxToke...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_syntax/src/identifier_ext.rs
crates/rome_js_syntax/src/identifier_ext.rs
use crate::{JsIdentifierAssignment, JsReferenceIdentifier, JsSyntaxToken, JsxReferenceIdentifier}; use rome_rowan::{declare_node_union, SyntaxResult}; declare_node_union! { pub AnyJsIdentifierUsage = JsReferenceIdentifier | JsIdentifierAssignment | JsxReferenceIdentifier } impl AnyJsIdentifierUsage { pub fn v...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_syntax/src/generated.rs
crates/rome_js_syntax/src/generated.rs
#[rustfmt::skip] pub(super) mod nodes; #[rustfmt::skip] pub(super) mod nodes_mut; #[rustfmt::skip] pub mod macros; #[macro_use] pub mod kind; pub use kind::*; pub use nodes::*;
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_syntax/src/generated/nodes_mut.rs
crates/rome_js_syntax/src/generated/nodes_mut.rs
//! Generated file, do not edit by hand, see `xtask/codegen` use crate::{generated::nodes::*, JsSyntaxToken as SyntaxToken}; use rome_rowan::AstNode; use std::iter::once; impl JsAccessorModifier { pub fn with_modifier_token(self, element: SyntaxToken) -> Self { Self::unwrap_cast( self.syntax ...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
true
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_syntax/src/generated/kind.rs
crates/rome_js_syntax/src/generated/kind.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #![allow(clippy::all)] #![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 JsSyntaxKin...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_syntax/src/generated/macros.rs
crates/rome_js_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](rome_rowan::SyntaxNode::kind)"] #[doc = r" of the provided [rome_rowan::SyntaxNode] and constructs the appropriate"] #[doc = r" AstNode...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
true
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_syntax/src/generated/nodes.rs
crates/rome_js_syntax/src/generated/nodes.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #![allow(clippy::enum_variant_names)] #![allow(clippy::match_like_matches_macro)] use crate::{ macros::map_syntax_node, JsLanguage as Language, JsSyntaxElement as SyntaxElement, JsSyntaxElementChildren as SyntaxElementChildren, JsSyntaxKind::...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
true
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_css_factory/src/lib.rs
crates/rome_css_factory/src/lib.rs
pub use crate::generated::CssSyntaxFactory; use rome_css_syntax::CssLanguage; use rome_rowan::TreeBuilder; mod generated; // Re-exported for tests #[doc(hidden)] pub use rome_css_syntax as syntax; pub type CssSyntaxTreeBuilder = TreeBuilder<'static, CssLanguage, CssSyntaxFactory>; pub use generated::node_factory as...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_css_factory/src/generated.rs
crates/rome_css_factory/src/generated.rs
#[rustfmt::skip] pub(super) mod syntax_factory; #[rustfmt::skip] pub mod node_factory; pub use syntax_factory::CssSyntaxFactory;
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_css_factory/src/generated/syntax_factory.rs
crates/rome_css_factory/src/generated/syntax_factory.rs
//! Generated file, do not edit by hand, see `xtask/codegen` use rome_css_syntax::{CssSyntaxKind, CssSyntaxKind::*, T, *}; use rome_rowan::{AstNode, ParsedChildren, RawNodeSlots, RawSyntaxNode, SyntaxFactory, SyntaxKind}; #[derive(Debug)] pub struct CssSyntaxFactory; impl SyntaxFactory for CssSyntaxFactory { type ...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
true
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_css_factory/src/generated/node_factory.rs
crates/rome_css_factory/src/generated/node_factory.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #![allow(clippy::redundant_closure)] #![allow(clippy::too_many_arguments)] use rome_css_syntax::{ CssSyntaxElement as SyntaxElement, CssSyntaxNode as SyntaxNode, CssSyntaxToken as SyntaxToken, *, }; use rome_rowan::AstNode; pub fn css_any_function(cs...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/prelude.rs
crates/rome_json_formatter/src/prelude.rs
//! This module provides important and useful traits to help to format tokens and nodes //! when implementing the [crate::FormatNodeRule] trait. #[allow(unused_imports)] pub(crate) use crate::{ AsFormat, FormatNodeRule, FormattedIterExt as _, IntoFormat, JsonFormatContext, JsonFormatter, }; pub(crate) use rome_for...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/lib.rs
crates/rome_json_formatter/src/lib.rs
mod comments; pub mod context; mod cst; mod format_string; mod generated; mod json; mod prelude; mod separated; use crate::comments::JsonCommentStyle; pub(crate) use crate::context::JsonFormatContext; use crate::context::JsonFormatOptions; use crate::cst::FormatJsonSyntaxNode; use rome_formatter::comments::Comments; u...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/comments.rs
crates/rome_json_formatter/src/comments.rs
use crate::prelude::*; use rome_diagnostics::category; use rome_formatter::comments::{ is_doc_comment, CommentKind, CommentStyle, Comments, SourceComment, }; use rome_formatter::formatter::Formatter; use rome_formatter::{write, FormatResult, FormatRule}; use rome_json_syntax::{JsonLanguage, TextLen}; use rome_rowan...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/format_string.rs
crates/rome_json_formatter/src/format_string.rs
use crate::prelude::*; use rome_formatter::token::string::{normalize_string, Quote}; use rome_json_syntax::JsonSyntaxToken; use std::borrow::Cow; pub(crate) fn format_string_token(token: &JsonSyntaxToken) -> CleanedStringLiteralText { CleanedStringLiteralText { token } } pub(crate) struct CleanedStringLiteralText...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/cst.rs
crates/rome_json_formatter/src/cst.rs
use crate::prelude::*; use rome_formatter::{FormatOwnedWithRule, FormatRefWithRule, FormatResult}; use rome_json_syntax::{map_syntax_node, JsonSyntaxNode}; #[derive(Debug, Copy, Clone, Default)] pub struct FormatJsonSyntaxNode; impl FormatRule<JsonSyntaxNode> for FormatJsonSyntaxNode { type Context = JsonFormatCo...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/context.rs
crates/rome_json_formatter/src/context.rs
use crate::JsonCommentStyle; use rome_formatter::prelude::*; use rome_formatter::{ CstFormatContext, FormatContext, FormatOptions, IndentStyle, LineWidth, TransformSourceMap, }; use crate::comments::{FormatJsonLeadingComment, JsonComments}; use rome_json_syntax::JsonLanguage; use std::fmt; use std::rc::Rc; #[deri...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/separated.rs
crates/rome_json_formatter/src/separated.rs
use crate::prelude::*; use crate::FormatJsonSyntaxToken; use rome_formatter::separated::{ FormatSeparatedElementRule, FormatSeparatedIter, TrailingSeparator, }; use rome_formatter::FormatRefWithRule; use rome_json_syntax::{JsonLanguage, JsonSyntaxToken}; use rome_rowan::{AstNode, AstSeparatedList, AstSeparatedListE...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/generated.rs
crates/rome_json_formatter/src/generated.rs
//! This is a generated file. Don't modify it by hand! Run 'cargo codegen formatter' to re-generate the file. use crate::{ AsFormat, FormatBogusNodeRule, FormatNodeRule, IntoFormat, JsonFormatContext, JsonFormatter, }; use rome_formatter::{FormatOwnedWithRule, FormatRefWithRule, FormatResult, FormatRule}; impl For...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/mod.rs
crates/rome_json_formatter/src/json/mod.rs
//! This is a generated file. Don't modify it by hand! Run 'cargo codegen formatter' to re-generate the file. pub(crate) mod any; pub(crate) mod auxiliary; pub(crate) mod bogus; pub(crate) mod lists; pub(crate) mod value;
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/lists/array_element_list.rs
crates/rome_json_formatter/src/json/lists/array_element_list.rs
use crate::prelude::*; use crate::separated::FormatAstSeparatedListExtension; use rome_formatter::write; use rome_json_syntax::{AnyJsonValue, JsonArrayElementList}; use rome_rowan::{AstNode, AstSeparatedList}; #[derive(Debug, Clone, Default)] pub(crate) struct FormatJsonArrayElementList; impl FormatRule<JsonArrayElem...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/lists/mod.rs
crates/rome_json_formatter/src/json/lists/mod.rs
//! This is a generated file. Don't modify it by hand! Run 'cargo codegen formatter' to re-generate the file. pub(crate) mod array_element_list; pub(crate) mod member_list;
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/lists/member_list.rs
crates/rome_json_formatter/src/json/lists/member_list.rs
use crate::prelude::*; use crate::separated::FormatAstSeparatedListExtension; use rome_json_syntax::JsonMemberList; use rome_rowan::{AstNode, AstSeparatedList}; #[derive(Debug, Clone, Default)] pub(crate) struct FormatJsonMemberList; impl FormatRule<JsonMemberList> for FormatJsonMemberList { type Context = JsonFo...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/bogus/bogus_value.rs
crates/rome_json_formatter/src/json/bogus/bogus_value.rs
use crate::FormatBogusNodeRule; use rome_json_syntax::JsonBogusValue; #[derive(Debug, Clone, Default)] pub(crate) struct FormatJsonBogusValue; impl FormatBogusNodeRule<JsonBogusValue> for FormatJsonBogusValue {}
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/bogus/mod.rs
crates/rome_json_formatter/src/json/bogus/mod.rs
//! This is a generated file. Don't modify it by hand! Run 'cargo codegen formatter' to re-generate the file. #[allow(clippy::module_inception)] pub(crate) mod bogus; pub(crate) mod bogus_value;
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/bogus/bogus.rs
crates/rome_json_formatter/src/json/bogus/bogus.rs
use crate::FormatBogusNodeRule; use rome_json_syntax::JsonBogus; #[derive(Debug, Clone, Default)] pub(crate) struct FormatJsonBogus; impl FormatBogusNodeRule<JsonBogus> for FormatJsonBogus {}
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/value/boolean_value.rs
crates/rome_json_formatter/src/json/value/boolean_value.rs
use crate::prelude::*; use rome_json_syntax::JsonBooleanValue; #[derive(Debug, Clone, Default)] pub(crate) struct FormatJsonBooleanValue; impl FormatNodeRule<JsonBooleanValue> for FormatJsonBooleanValue { fn fmt_fields(&self, node: &JsonBooleanValue, f: &mut JsonFormatter) -> FormatResult<()> { node.value...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/value/null_value.rs
crates/rome_json_formatter/src/json/value/null_value.rs
use crate::prelude::*; use rome_json_syntax::JsonNullValue; #[derive(Debug, Clone, Default)] pub(crate) struct FormatJsonNullValue; impl FormatNodeRule<JsonNullValue> for FormatJsonNullValue { fn fmt_fields(&self, node: &JsonNullValue, f: &mut JsonFormatter) -> FormatResult<()> { node.value_token()?.forma...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/value/string_value.rs
crates/rome_json_formatter/src/json/value/string_value.rs
use crate::format_string::format_string_token; use crate::prelude::*; use rome_json_syntax::JsonStringValue; #[derive(Debug, Clone, Default)] pub(crate) struct FormatJsonStringValue; impl FormatNodeRule<JsonStringValue> for FormatJsonStringValue { fn fmt_fields(&self, node: &JsonStringValue, f: &mut JsonFormatter...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/value/mod.rs
crates/rome_json_formatter/src/json/value/mod.rs
//! This is a generated file. Don't modify it by hand! Run 'cargo codegen formatter' to re-generate the file. pub(crate) mod array_value; pub(crate) mod boolean_value; pub(crate) mod null_value; pub(crate) mod number_value; pub(crate) mod object_value; pub(crate) mod string_value;
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/value/array_value.rs
crates/rome_json_formatter/src/json/value/array_value.rs
use crate::prelude::*; use rome_formatter::write; use rome_json_syntax::JsonArrayValue; use rome_json_syntax::JsonArrayValueFields; #[derive(Debug, Clone, Default)] pub(crate) struct FormatJsonArrayValue; impl FormatNodeRule<JsonArrayValue> for FormatJsonArrayValue { fn fmt_fields(&self, node: &JsonArrayValue, f: ...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/value/number_value.rs
crates/rome_json_formatter/src/json/value/number_value.rs
use crate::prelude::*; use rome_formatter::token::number::format_number_token; use rome_json_syntax::JsonNumberValue; #[derive(Debug, Clone, Default)] pub(crate) struct FormatJsonNumberValue; impl FormatNodeRule<JsonNumberValue> for FormatJsonNumberValue { fn fmt_fields(&self, node: &JsonNumberValue, f: &mut Json...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/value/object_value.rs
crates/rome_json_formatter/src/json/value/object_value.rs
use crate::prelude::*; use rome_formatter::{format_args, write}; use rome_json_syntax::JsonObjectValue; use rome_rowan::AstNode; #[derive(Debug, Clone, Default)] pub(crate) struct FormatJsonObjectValue; impl FormatNodeRule<JsonObjectValue> for FormatJsonObjectValue { fn fmt_fields(&self, node: &JsonObjectValue, f...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/auxiliary/member_name.rs
crates/rome_json_formatter/src/json/auxiliary/member_name.rs
use crate::format_string::format_string_token; use crate::prelude::*; use rome_json_syntax::JsonMemberName; #[derive(Debug, Clone, Default)] pub(crate) struct FormatJsonMemberName; impl FormatNodeRule<JsonMemberName> for FormatJsonMemberName { fn fmt_fields(&self, node: &JsonMemberName, f: &mut JsonFormatter) -> ...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/auxiliary/root.rs
crates/rome_json_formatter/src/json/auxiliary/root.rs
use crate::prelude::*; use rome_formatter::write; use rome_json_syntax::{JsonRoot, JsonRootFields}; #[derive(Debug, Clone, Default)] pub(crate) struct FormatJsonRoot; impl FormatNodeRule<JsonRoot> for FormatJsonRoot { fn fmt_fields(&self, node: &JsonRoot, f: &mut JsonFormatter) -> FormatResult<()> { let J...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/auxiliary/mod.rs
crates/rome_json_formatter/src/json/auxiliary/mod.rs
//! This is a generated file. Don't modify it by hand! Run 'cargo codegen formatter' to re-generate the file. pub(crate) mod member; pub(crate) mod member_name; pub(crate) mod root;
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/auxiliary/member.rs
crates/rome_json_formatter/src/json/auxiliary/member.rs
use crate::prelude::*; use rome_formatter::{format_args, write}; use rome_json_syntax::{JsonMember, JsonMemberFields}; #[derive(Debug, Clone, Default)] pub(crate) struct FormatJsonMember; impl FormatNodeRule<JsonMember> for FormatJsonMember { fn fmt_fields(&self, node: &JsonMember, f: &mut JsonFormatter) -> Forma...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/any/value.rs
crates/rome_json_formatter/src/json/any/value.rs
//! This is a generated file. Don't modify it by hand! Run 'cargo codegen formatter' to re-generate the file. use crate::prelude::*; use rome_json_syntax::AnyJsonValue; #[derive(Debug, Clone, Default)] pub(crate) struct FormatAnyJsonValue; impl FormatRule<AnyJsonValue> for FormatAnyJsonValue { type Context = JsonF...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/src/json/any/mod.rs
crates/rome_json_formatter/src/json/any/mod.rs
//! This is a generated file. Don't modify it by hand! Run 'cargo codegen formatter' to re-generate the file. pub(crate) mod value;
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/tests/quick_test.rs
crates/rome_json_formatter/tests/quick_test.rs
use rome_formatter_test::check_reformat::CheckReformat; use rome_json_formatter::context::JsonFormatOptions; use rome_json_formatter::format_node; use rome_json_parser::{parse_json, JsonParserOptions}; mod language { include!("language.rs"); } #[ignore] #[test] // use this test check if your snippet prints as you...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/tests/spec_test.rs
crates/rome_json_formatter/tests/spec_test.rs
use rome_formatter_test::spec::{SpecSnapshot, SpecTestFile}; use rome_json_formatter::context::JsonFormatOptions; use std::path::Path; mod language { include!("language.rs"); } /// [insta.rs](https://insta.rs/docs) snapshot testing /// /// For better development workflow, run /// `cargo watch -i '*.new' -x 'test ...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/tests/prettier_tests.rs
crates/rome_json_formatter/tests/prettier_tests.rs
use std::{env, path::Path}; use rome_formatter::IndentStyle; use rome_formatter_test::test_prettier_snapshot::{PrettierSnapshot, PrettierTestFile}; use rome_json_formatter::context::JsonFormatOptions; #[derive(serde::Serialize)] struct TestInfo { test_file: String, } mod language; tests_macros::gen_tests! {"tes...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/tests/spec_tests.rs
crates/rome_json_formatter/tests/spec_tests.rs
mod quick_test; mod spec_test; mod formatter { mod json_module { tests_macros::gen_tests! {"tests/specs/json/**/*.json", crate::spec_test::run, ""} } }
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_formatter/tests/language.rs
crates/rome_json_formatter/tests/language.rs
use rome_formatter::{FormatContext, FormatResult, Formatted, IndentStyle, LineWidth, Printed}; use rome_formatter_test::TestFormatLanguage; use rome_json_formatter::context::{JsonFormatContext, JsonFormatOptions}; use rome_json_formatter::{format_node, format_range, JsonFormatLanguage}; use rome_json_parser::{parse_jso...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_text_edit/src/lib.rs
crates/rome_text_edit/src/lib.rs
//! Representation of a `TextEdit`. //! //! This is taken from [rust-analyzer's text_edit crate](https://rust-analyzer.github.io/rust-analyzer/text_edit/index.html) #![warn( rust_2018_idioms, unused_lifetimes, semicolon_in_expressions_from_macros )] use std::{cmp::Ordering, num::NonZeroU32}; use rome_tex...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_semantic/src/lib.rs
crates/rome_js_semantic/src/lib.rs
mod events; mod semantic_model; #[cfg(test)] mod tests; pub use events::*; pub use semantic_model::*;
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_semantic/src/events.rs
crates/rome_js_semantic/src/events.rs
//! Events emitted by the [SemanticEventExtractor] which are then constructed into the Semantic Model use rustc_hash::FxHashMap; use std::collections::{HashMap, VecDeque}; use rome_js_syntax::{ AnyJsAssignment, AnyJsAssignmentPattern, AnyJsExpression, JsAssignmentExpression, JsCallExpression, JsForVariableDec...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
true
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_semantic/src/semantic_model.rs
crates/rome_js_semantic/src/semantic_model.rs
mod binding; mod builder; mod closure; mod globals; mod import; mod is_constant; mod model; mod reference; mod scope; #[cfg(test)] mod tests; use crate::{SemanticEvent, SemanticEventExtractor}; pub use closure::*; use rome_js_syntax::{ AnyJsExpression, AnyJsRoot, JsIdentifierAssignment, JsIdentifierBinding, JsLan...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_semantic/src/tests/references.rs
crates/rome_js_semantic/src/tests/references.rs
use crate::assert_semantics; // Reads assert_semantics! { ok_reference_read_global, "let a/*#A*/ = 1; let b = a/*READ A*/ + 1;", ok_reference_read_inner_scope, r#"function f(a/*#A1*/) { let b = a/*READ A1*/ + 1; console.log(b); if (true) { let a/*#A2*/ = 2; let b =...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_semantic/src/tests/functions.rs
crates/rome_js_semantic/src/tests/functions.rs
use crate::assert_semantics; // functions assert_semantics! { ok_function_declaration, "function f/*#F*/ () {}", ok_function_call, "function f/*#F*/ () {} f/*READ F*/();", ok_function_hoisted_call, "function f/*#F*/ () { g/*READ G*/(); } function g/*#G*/() {}", ok_function_inner_function, "fun...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_semantic/src/tests/mod.rs
crates/rome_js_semantic/src/tests/mod.rs
mod assertions; pub mod declarations; mod functions; mod references; mod scopes; #[macro_export] macro_rules! assert_semantics { ($(#[$attr:meta])* $($name:ident, $code:expr,)*) => { $( #[test] pub fn $name() { $crate::tests::assertions::assert($code, stringify!($nam...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_semantic/src/tests/declarations.rs
crates/rome_js_semantic/src/tests/declarations.rs
use crate::assert_semantics; // Imports assert_semantics! { ok_declaration_import, "/*START GLOBAL*/ import a/*#a*//*@GLOBAL*/ from 'a'", } // Statements assert_semantics! { ok_declaration_if, ";if(true) {/*START A*/ let b/*#b*//*@A*/ = 1; }", ok_declaration_at_for, ";for/*START A*/ (let a/*#a*//*@A*/;;) ...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_semantic/src/tests/scopes.rs
crates/rome_js_semantic/src/tests/scopes.rs
use crate::assert_semantics; // Statements assert_semantics! { ok_scope_if, "if(true) {/*START A*/}/*END A*/", ok_scope_if_no_block, "if(true) ;/*NOEVENT*/;", ok_scope_if_without_block_else_with_block, "if(true) ;/*NOEVENT*/ else {/*START A*/}/*END A*/;", ok_scope_if_without_block_else_without_block, "...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_semantic/src/tests/assertions.rs
crates/rome_js_semantic/src/tests/assertions.rs
use crate::{semantic_events, SemanticEvent}; use rome_console::{markup, ConsoleExt, EnvConsole}; use rome_diagnostics::location::AsSpan; use rome_diagnostics::{ Advices, Diagnostic, DiagnosticExt, Location, LogCategory, PrintDiagnostic, Visit, }; use rome_js_parser::JsParserOptions; use rome_js_syntax::{AnyJsRoot, ...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
true
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_semantic/src/semantic_model/reference.rs
crates/rome_js_semantic/src/semantic_model/reference.rs
use rome_js_syntax::{AnyJsFunction, AnyJsIdentifierUsage, JsCallExpression}; use super::*; use std::sync::Arc; /// Provides all information regarding to a specific reference. #[derive(Debug)] pub struct Reference { pub(crate) data: Arc<SemanticModelData>, pub(crate) index: ReferenceIndex, } impl Reference { ...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_semantic/src/semantic_model/builder.rs
crates/rome_js_semantic/src/semantic_model/builder.rs
use super::*; use rome_js_syntax::{AnyJsRoot, JsSyntaxNode, TextRange}; use rustc_hash::{FxHashMap, FxHashSet}; use std::collections::hash_map::Entry; /// Builds the [SemanticModel] consuming [SemanticEvent] and [SyntaxNode]. /// For a good example on how to use it see [semantic_model]. /// /// [SemanticModelBuilder] ...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_semantic/src/semantic_model/tests.rs
crates/rome_js_semantic/src/semantic_model/tests.rs
#[cfg(test)] mod test { use crate::{ semantic_model, BindingExtensions, CanBeImportedExported, SemanticModelOptions, SemanticScopeExtensions, }; use rome_js_parser::JsParserOptions; use rome_js_syntax::{ JsFileSource, JsIdentifierAssignment, JsIdentifierBinding, JsReferenceIdenti...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_semantic/src/semantic_model/is_constant.rs
crates/rome_js_semantic/src/semantic_model/is_constant.rs
use rome_js_syntax::{AnyJsExpression, JsSyntaxKind}; use rome_rowan::AstNode; pub fn is_constant(expr: &AnyJsExpression) -> bool { for node in expr.syntax().descendants() { if matches!(node.kind(), JsSyntaxKind::JS_REFERENCE_IDENTIFIER) { return false; } } true } #[cfg(test)] m...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_semantic/src/semantic_model/globals.rs
crates/rome_js_semantic/src/semantic_model/globals.rs
use super::*; use rome_js_syntax::{JsSyntaxNode, TextRange}; use std::sync::Arc; #[derive(Debug)] pub struct SemanticModelGlobalBindingData { pub(crate) references: Vec<SemanticModelGlobalReferenceData>, } #[derive(Debug)] pub struct SemanticModelGlobalReferenceData { pub(crate) range: TextRange, pub(crat...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_semantic/src/semantic_model/scope.rs
crates/rome_js_semantic/src/semantic_model/scope.rs
use super::*; use rome_js_syntax::TextRange; use rome_rowan::TokenText; use rustc_hash::FxHashMap; use std::sync::Arc; #[derive(Debug)] pub(crate) struct SemanticModelScopeData { // The scope range pub(crate) range: TextRange, // The parent scope of this scope pub(crate) parent: Option<usize>, // A...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_semantic/src/semantic_model/closure.rs
crates/rome_js_semantic/src/semantic_model/closure.rs
use super::*; use rome_js_syntax::{ JsArrowFunctionExpression, JsConstructorClassMember, JsFunctionDeclaration, JsFunctionExpression, JsGetterClassMember, JsGetterObjectMember, JsLanguage, JsMethodClassMember, JsMethodObjectMember, JsSetterClassMember, JsSetterObjectMember, }; use rome_rowan::{AstNode, Synt...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_semantic/src/semantic_model/model.rs
crates/rome_js_semantic/src/semantic_model/model.rs
use super::*; use rome_js_syntax::{AnyJsFunction, AnyJsRoot, JsInitializerClause, JsVariableDeclarator}; #[derive(Copy, Clone, Debug)] pub(crate) struct BindingIndex(usize); impl From<usize> for BindingIndex { fn from(v: usize) -> Self { BindingIndex(v) } } #[derive(Copy, Clone, Debug)] pub(crate) st...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_semantic/src/semantic_model/binding.rs
crates/rome_js_semantic/src/semantic_model/binding.rs
use super::*; use rome_js_syntax::{binding_ext::AnyJsIdentifierBinding, TextRange, TsTypeParameterName}; /// Internal type with all the semantic data of a specific binding #[derive(Debug)] pub(crate) struct SemanticModelBindingData { pub id: BindingIndex, pub range: TextRange, pub references: Vec<SemanticM...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_semantic/src/semantic_model/import.rs
crates/rome_js_semantic/src/semantic_model/import.rs
use super::*; use crate::{HasDeclarationAstNode, SemanticModel}; use rome_js_syntax::{ binding_ext::AnyJsIdentifierBinding, JsIdentifierBinding, JsLanguage, JsSyntaxKind, }; use rome_rowan::AstNode; pub(crate) fn is_imported(node: &JsSyntaxNode) -> bool { node.ancestors() .any(|x| matches!(x.kind(), Js...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_aria/src/lib.rs
crates/rome_aria/src/lib.rs
use std::str::FromStr; pub mod iso; mod macros; pub mod properties; pub mod roles; pub use properties::AriaProperties; pub(crate) use roles::AriaRoleDefinition; pub use roles::AriaRoles; pub use rome_aria_metadata::{AriaPropertiesEnum, AriaPropertyTypeEnum}; /// It checks if an ARIA property is valid /// /// ## Exam...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_aria/src/properties.rs
crates/rome_aria/src/properties.rs
use crate::define_property; use rome_aria_metadata::AriaPropertyTypeEnum; use std::fmt::Debug; use std::slice::Iter; use std::str::FromStr; define_property! { AriaActivedescendant { PROPERTY_TYPE: "id", VALUES: [], } } define_property! { AriaAtomic { PROPERTY_TYPE: "boolean", ...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_aria/src/macros.rs
crates/rome_aria/src/macros.rs
#[macro_export] macro_rules! define_role { ( $( #[doc = $doc:literal] )+ $id:ident { PROPS: $p_value:expr, ROLES: $r_value:expr, }) => { $( #[doc = $doc] )* #[derive(Debug)] struct $id; impl $id { const PROPS: &[(&'static str, bool)] = &$p_value; ...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_aria/src/roles.rs
crates/rome_aria/src/roles.rs
use crate::{define_role, is_aria_property_valid}; use rome_aria_metadata::AriaPropertiesEnum; use std::collections::HashMap; use std::fmt::Debug; use std::slice::Iter; use std::str::FromStr; pub trait AriaRoleDefinition: Debug { /// It returns an iterator over the properties of the current role /// /// ## ...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
true
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_aria/src/iso.rs
crates/rome_aria/src/iso.rs
use rome_aria_metadata::{IsoCountries, IsoLanguages, ISO_COUNTRIES, ISO_LANGUAGES}; use std::str::FromStr; /// Returns a list of valid ISO countries pub fn is_valid_country(country: &str) -> bool { IsoCountries::from_str(country).is_ok() } /// Returns a list of valid ISO languages pub fn is_valid_language(languag...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_fs/src/path.rs
crates/rome_fs/src/path.rs
//! This module is responsible to manage paths inside Rome. //! It is a small wrapper around [path::PathBuf] but it is also able to //! give additional information around the the file that holds: //! - the [FileHandlers] for the specific file //! - shortcuts to open/write to the file use std::fs::read_to_string; use st...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_fs/src/lib.rs
crates/rome_fs/src/lib.rs
mod fs; mod interner; mod path; pub use fs::{ AutoSearchResult, ErrorEntry, File, FileSystem, FileSystemDiagnostic, FileSystemExt, MemoryFileSystem, OpenOptions, OsFileSystem, TraversalContext, TraversalScope, CONFIG_NAME, }; pub use interner::PathInterner; pub use path::RomePath;
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_fs/src/interner.rs
crates/rome_fs/src/interner.rs
use crossbeam::channel::{unbounded, Receiver, Sender}; use indexmap::IndexSet; use std::path::PathBuf; use std::sync::RwLock; /// File paths interner cache /// /// The path interner stores an instance of [PathBuf] pub struct PathInterner { storage: RwLock<IndexSet<PathBuf>>, handler: Sender<PathBuf>, } impl P...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_fs/src/fs.rs
crates/rome_fs/src/fs.rs
use crate::{PathInterner, RomePath}; pub use memory::{ErrorEntry, MemoryFileSystem}; pub use os::OsFileSystem; use rome_diagnostics::{console, Advices, Diagnostic, LogCategory, Visit}; use rome_diagnostics::{Error, Severity}; use serde::{Deserialize, Serialize}; use std::io; use std::panic::RefUnwindSafe; use std::path...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_fs/src/fs/os.rs
crates/rome_fs/src/fs/os.rs
//! Implementation of the [FileSystem] and related traits for the underlying OS filesystem use super::{BoxedTraversal, ErrorKind, File, FileSystemDiagnostic}; use crate::fs::OpenOptions; use crate::{ fs::{TraversalContext, TraversalScope}, FileSystem, RomePath, }; use rayon::{scope, Scope}; use rome_diagnostics...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_fs/src/fs/memory.rs
crates/rome_fs/src/fs/memory.rs
use std::collections::hash_map::Entry; use std::collections::{hash_map::IntoIter, HashMap}; use std::io; use std::panic::AssertUnwindSafe; use std::path::{Path, PathBuf}; use std::str; use std::sync::Arc; use parking_lot::{lock_api::ArcMutexGuard, Mutex, RawMutex, RwLock}; use rome_diagnostics::{Error, Severity}; use...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_aria_metadata/build.rs
crates/rome_aria_metadata/build.rs
//! Metadata of: //! - ARIA properties //! - ARIA property types //! - ARIA roles use case::CaseExt; use proc_macro2::{Ident, Literal, Span, TokenStream}; use quote::quote; use std::path::PathBuf; use std::{env, fs, io}; pub const ARIA_PROPERTIES: [&str; 48] = [ "aria-activedescendant", "aria-atomic", "ar...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_aria_metadata/src/lib.rs
crates/rome_aria_metadata/src/lib.rs
include!(concat!(env!("OUT_DIR"), "/roles_and_properties.rs")); pub const ISO_COUNTRIES: [&str; 233] = [ "AF", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BA", "BW", "BR", "IO", "VG", "BN", "BG", "BF"...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_console/src/markup.rs
crates/rome_console/src/markup.rs
use std::{ borrow::Cow, fmt::{self, Debug}, io, }; use rome_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 = "ser...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_console/src/lib.rs
crates/rome_console/src/lib.rs
use atty::Stream; use std::io; use std::io::{Read, Stdin, Write}; use std::panic::RefUnwindSafe; use termcolor::{ColorChoice, StandardStream}; use write::Termcolor; pub mod fmt; mod markup; mod write; pub use self::markup::{Markup, MarkupBuf, MarkupElement, MarkupNode}; use crate::fmt::Formatter; pub use rome_markup:...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_console/src/write.rs
crates/rome_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
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_console/src/fmt.rs
crates/rome_console/src/fmt.rs
use std::{borrow::Cow, fmt, io, time::Duration}; pub use crate::write::{Termcolor, Write, HTML}; use crate::{markup, Markup, MarkupElement}; /// A stack-allocated linked-list of [MarkupElement] slices #[derive(Clone, Copy)] pub enum MarkupElements<'a> { Root, Node(&'a Self, &'a [MarkupElement<'a>]), } impl<'...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_console/src/write/html.rs
crates/rome_console/src/write/html.rs
use std::{ fmt, io::{self, Write as _}, }; use crate::{fmt::MarkupElements, MarkupElement}; 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); impl<W> Write for HTML<W> where W: io::Wr...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_console/src/write/termcolor.rs
crates/rome_console/src/write/termcolor.rs
use std::{ fmt::{self, Write as _}, io, }; use termcolor::{Color, ColorSpec, WriteColor}; use unicode_width::UnicodeWidthChar; use crate::{fmt::MarkupElements, MarkupElement}; use super::Write; /// Adapter struct implementing [Write] over types implementing [WriteColor] pub struct Termcolor<W>(pub W); impl...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_console/tests/macro.rs
crates/rome_console/tests/macro.rs
use rome_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 rome_markup::markup! { <Info><Emphasis>{category}<...
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_console/tests/markup/open_element_unfinished_4.rs
crates/rome_console/tests/markup/open_element_unfinished_4.rs
fn main() { rome_console::markup! { <Emphasis prop } }
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_console/tests/markup/open_element_unfinished_3.rs
crates/rome_console/tests/markup/open_element_unfinished_3.rs
fn main() { rome_console::markup! { <Emphasis / } }
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_console/tests/markup/unclosed_element.rs
crates/rome_console/tests/markup/unclosed_element.rs
fn main() { rome_console::markup! { <Emphasis> } }
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_console/tests/markup/open_element_unfinished_2.rs
crates/rome_console/tests/markup/open_element_unfinished_2.rs
fn main() { rome_console::markup! { <Emphasis } }
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_console/tests/markup/open_element_improper_prop_value.rs
crates/rome_console/tests/markup/open_element_improper_prop_value.rs
fn main() { rome_console::markup! { <Emphasis property=ident /> } }
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_console/tests/markup/open_element_improper_close_2.rs
crates/rome_console/tests/markup/open_element_improper_close_2.rs
fn main() { rome_console::markup! { <Emphasis /"Literal" } }
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_console/tests/markup/open_element_unfinished_5.rs
crates/rome_console/tests/markup/open_element_unfinished_5.rs
fn main() { rome_console::markup! { <Emphasis prop= } }
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_console/tests/markup/open_element_improper_close_1.rs
crates/rome_console/tests/markup/open_element_improper_close_1.rs
fn main() { rome_console::markup! { <Emphasis /< } }
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_console/tests/markup/open_element_unfinished_6.rs
crates/rome_console/tests/markup/open_element_unfinished_6.rs
fn main() { rome_console::markup! { <Emphasis prop={} } }
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_console/tests/markup/element_non_ident_name.rs
crates/rome_console/tests/markup/element_non_ident_name.rs
fn main() { rome_console::markup! { <"Literal" /> } }
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false
rome/tools
https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_console/tests/markup/invalid_group.rs
crates/rome_console/tests/markup/invalid_group.rs
fn main() { rome_console::markup! { [] } }
rust
MIT
392d188a49d70e495f13b1bb08cd7d9c43690f9b
2026-01-04T15:38:12.578592Z
false