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_cli/tests/snap_test.rs | crates/rome_cli/tests/snap_test.rs | use rome_cli::CliDiagnostic;
use rome_console::fmt::{Formatter, Termcolor};
use rome_console::{markup, BufferConsole, Markup};
use rome_diagnostics::termcolor::NoColor;
use rome_diagnostics::{print_diagnostic_to_string, Error};
use rome_formatter::IndentStyle;
use rome_fs::{FileSystemExt, MemoryFileSystem};
use rome_js... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_cli/tests/cases/mod.rs | crates/rome_cli/tests/cases/mod.rs | //! Add here test cases that are not related directly to a command, but to specific
//! case that affects many commands
mod config_extends;
| rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_cli/tests/cases/config_extends.rs | crates/rome_cli/tests/cases/config_extends.rs | use crate::run_cli;
use crate::snap_test::{assert_cli_snapshot, SnapshotPayload};
use bpaf::Args;
use rome_console::BufferConsole;
use rome_fs::MemoryFileSystem;
use rome_service::DynRef;
use std::path::Path;
#[test]
fn extends_config_ok_formatter_no_linter() {
let mut fs = MemoryFileSystem::default();
let mut... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_cli/tests/commands/ci.rs | crates/rome_cli/tests/commands/ci.rs | use crate::configs::{CONFIG_DISABLED_FORMATTER, CONFIG_FILE_SIZE_LIMIT, CONFIG_LINTER_DISABLED};
use crate::snap_test::SnapshotPayload;
use crate::{
assert_cli_snapshot, run_cli, CUSTOM_FORMAT_BEFORE, FORMATTED, LINT_ERROR, PARSE_ERROR,
UNFORMATTED,
};
use bpaf::Args;
use rome_console::{BufferConsole, MarkupBuf... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_cli/tests/commands/version.rs | crates/rome_cli/tests/commands/version.rs | use crate::snap_test::SnapshotPayload;
use crate::{assert_cli_snapshot, run_cli};
use bpaf::Args;
use rome_console::BufferConsole;
use rome_fs::MemoryFileSystem;
use rome_service::DynRef;
#[test]
fn ok() {
let mut fs = MemoryFileSystem::default();
let mut console = BufferConsole::default();
let result = r... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_cli/tests/commands/rage.rs | crates/rome_cli/tests/commands/rage.rs | use crate::run_cli;
use crate::snap_test::{CliSnapshot, SnapshotPayload};
use bpaf::Args;
use rome_cli::CliDiagnostic;
use rome_console::{BufferConsole, Console};
use rome_fs::{FileSystem, MemoryFileSystem};
use rome_service::DynRef;
use std::path::{Path, PathBuf};
use std::sync::{Mutex, MutexGuard};
use std::{env, fs}... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_cli/tests/commands/migrate.rs | crates/rome_cli/tests/commands/migrate.rs | use crate::run_cli;
use crate::snap_test::{assert_cli_snapshot, SnapshotPayload};
use bpaf::Args;
use rome_console::BufferConsole;
use rome_fs::{FileSystemExt, MemoryFileSystem};
use rome_service::DynRef;
use std::path::Path;
#[test]
fn migrate_help() {
let mut fs = MemoryFileSystem::default();
let mut console... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_cli/tests/commands/check.rs | crates/rome_cli/tests/commands/check.rs | use bpaf::Args;
use std::env::temp_dir;
use std::fs::{create_dir, create_dir_all, remove_dir_all, File};
use std::io::Write;
#[cfg(target_family = "unix")]
use std::os::unix::fs::symlink;
#[cfg(target_os = "windows")]
use std::os::windows::fs::{symlink_dir, symlink_file};
use std::path::{Path, PathBuf};
use crate::con... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | true |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_cli/tests/commands/lint.rs | crates/rome_cli/tests/commands/lint.rs | use bpaf::Args;
use std::env::temp_dir;
use std::fs::{create_dir, create_dir_all, remove_dir_all, File};
use std::io::Write;
#[cfg(target_family = "unix")]
use std::os::unix::fs::symlink;
#[cfg(target_os = "windows")]
use std::os::windows::fs::{symlink_dir, symlink_file};
use std::path::{Path, PathBuf};
use crate::con... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | true |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_cli/tests/commands/mod.rs | crates/rome_cli/tests/commands/mod.rs | mod check;
mod ci;
mod format;
mod init;
mod lint;
mod lsp_proxy;
mod migrate;
mod rage;
mod version;
| rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_cli/tests/commands/format.rs | crates/rome_cli/tests/commands/format.rs | use crate::configs::{
CONFIG_DISABLED_FORMATTER, CONFIG_FILE_SIZE_LIMIT, CONFIG_FORMAT,
CONFIG_FORMATTER_AND_FILES_IGNORE, CONFIG_FORMATTER_IGNORED_DIRECTORIES,
CONFIG_FORMATTER_IGNORED_FILES, CONFIG_ISSUE_3175_1, CONFIG_ISSUE_3175_2,
};
use crate::snap_test::{markup_to_string, SnapshotPayload};
use crate::... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | true |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_cli/tests/commands/init.rs | crates/rome_cli/tests/commands/init.rs | use crate::configs::{CONFIG_INIT_DEFAULT, CONFIG_INIT_DEFAULT_WHEN_INSTALLED};
use crate::run_cli;
use crate::snap_test::{assert_cli_snapshot, SnapshotPayload};
use bpaf::Args;
use rome_console::BufferConsole;
use rome_fs::{FileSystemExt, MemoryFileSystem};
use rome_json_formatter::context::JsonFormatOptions;
use rome_... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_cli/tests/commands/lsp_proxy.rs | crates/rome_cli/tests/commands/lsp_proxy.rs | use crate::run_cli;
use crate::snap_test::{assert_cli_snapshot, SnapshotPayload};
use bpaf::Args;
use rome_console::BufferConsole;
use rome_fs::MemoryFileSystem;
use rome_service::DynRef;
#[test]
fn lsp_proxy_help() {
let mut fs = MemoryFileSystem::default();
let mut console = BufferConsole::default();
le... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/prelude.rs | crates/rome_js_parser/src/prelude.rs | pub(crate) use crate::parser::JsParser;
pub use rome_parser::prelude::*;
| rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/lib.rs | crates/rome_js_parser/src/lib.rs | //! Extremely fast, lossless, and error tolerant JavaScript Parser.
//!
//! The parser uses an abstraction over non-whitespace tokens.
//! This allows us to losslessly or lossly parse code without requiring explicit handling of whitespace.
//! The parser yields events, not an AST, the events are resolved into untyped s... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/parse.rs | crates/rome_js_parser/src/parse.rs | //! Utilities for high level parsing of js code.
use crate::*;
use rome_js_syntax::{
AnyJsRoot, JsFileSource, JsLanguage, JsModule, JsScript, JsSyntaxNode, ModuleKind,
};
use rome_parser::event::Event;
use rome_parser::token_source::Trivia;
use rome_rowan::{AstNode, NodeCache};
use std::marker::PhantomData;
/// A... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/tests.rs | crates/rome_js_parser/src/tests.rs | use crate::test_utils::has_bogus_nodes_or_empty_slots;
use crate::{parse, parse_module, test_utils::assert_errors_are_absent, JsParserOptions, Parse};
use expect_test::expect_file;
use rome_console::fmt::{Formatter, Termcolor};
use rome_console::markup;
use rome_diagnostics::DiagnosticExt;
use rome_diagnostics::PrintDi... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/token_source.rs | crates/rome_js_parser/src/token_source.rs | use crate::lexer::{BufferedLexer, LexContext, Lexer, LexerCheckpoint, ReLexContext, TextRange};
use crate::prelude::*;
use rome_js_syntax::JsSyntaxKind;
use rome_js_syntax::JsSyntaxKind::EOF;
use rome_parser::token_source::Trivia;
use rome_rowan::{TextSize, TriviaPieceKind};
use std::collections::VecDeque;
/// Token s... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/parser.rs | crates/rome_js_parser/src/parser.rs | //! The physical parser structure.
//! This may not hold your expectations of a traditional parser,
//! the parser yields events like `Start node`, `Error`, etc.
//! These events are then applied to a `TreeSink`.
use rome_parser::*;
pub(crate) mod rewrite_parser;
pub(crate) mod single_token_parse_recovery;
use crate:... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/rewrite.rs | crates/rome_js_parser/src/rewrite.rs | //! Events emitted by the Parser which are then constructed into a syntax tree
use crate::lexer::TextSize;
use crate::parser::rewrite_parser::{RewriteParser, RewriteToken};
use crate::parser::JsParserCheckpoint;
use crate::JsParser;
use rome_js_syntax::JsSyntaxKind;
use rome_parser::tree_sink::TreeSink;
use rome_parse... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/state.rs | crates/rome_js_parser/src/state.rs | use crate::prelude::*;
use bitflags::bitflags;
use indexmap::IndexMap;
use rome_js_syntax::JsFileSource;
use rome_rowan::{TextRange, TextSize};
use std::collections::HashSet;
use std::ops::{Deref, DerefMut, Range};
type LabelSet = IndexMap<String, LabelledItem>;
#[derive(Debug, Clone, Eq, PartialEq)]
pub(crate) enum ... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/test_utils.rs | crates/rome_js_parser/src/test_utils.rs | use crate::Parse;
use rome_console::fmt::{Formatter, Termcolor};
use rome_console::markup;
use rome_diagnostics::DiagnosticExt;
use rome_diagnostics::{termcolor::Buffer, PrintDiagnostic};
use rome_js_syntax::{JsLanguage, JsSyntaxNode};
use rome_rowan::{AstNode, SyntaxKind, SyntaxSlot};
use std::{fmt::Debug, path::Path}... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/syntax.rs | crates/rome_js_parser/src/syntax.rs | //! The Js syntax itself and parser functions.
//!
//! The actual parsing is done in these modules.
//! Every single function is public, this is to allow people to
//! use the parser for their specific needs, for example, parsing
//! only an expression.
//!
//! Functions emit markers, see `CompletedMarker` and `Marker`... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/span.rs | crates/rome_js_parser/src/span.rs | use rome_rowan::{Language, SyntaxElement, SyntaxNode, SyntaxToken, TextRange, TextSize};
use std::{fmt::Debug, ops::Range};
/// A value which can be used as the range inside of a diagnostic.
///
/// This is essentially a hack to allow us to use SyntaxElement, SyntaxNode, etc directly
pub trait Span {
fn as_range(&... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/options.rs | crates/rome_js_parser/src/options.rs | /// Options to pass to the JavaScript parser
#[derive(Debug, Clone, Default)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct JsParserOptions {
/// Whether the parsing of the class parameter decorators should hap... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/syntax/object.rs | crates/rome_js_parser/src/syntax/object.rs | #[allow(deprecated)]
use crate::parser::single_token_parse_recovery::SingleTokenParseRecovery;
use crate::parser::ParsedSyntax::{Absent, Present};
use crate::parser::{ParsedSyntax, RecoveryResult};
use crate::prelude::*;
use crate::state::{EnterParameters, SignatureFlags};
use crate::syntax::class::parse_decorators;
us... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/syntax/expr.rs | crates/rome_js_parser/src/syntax/expr.rs | //! Expressions, these include `this`, identifiers, arrays, objects,
//! binary expressions, unary expressions, and more.
//!
//! See the [ECMAScript spec](https://www.ecma-international.org/ecma-262/5.1/#sec-11).
use super::typescript::*;
use crate::lexer::{LexContext, ReLexContext};
use crate::parser::rewrite_parser... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | true |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/syntax/program.rs | crates/rome_js_parser/src/syntax/program.rs | //! Top level functions for parsing a script or module, also includes module specific items.
use super::module::parse_module_body;
use super::stmt::parse_statements;
use crate::prelude::*;
use crate::state::{ChangeParserState, EnableStrictMode};
use crate::syntax::stmt::parse_directives;
use crate::JsParser;
use rome_... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/syntax/pattern.rs | crates/rome_js_parser/src/syntax/pattern.rs | //! Provides traits for parsing pattern like nodes
use crate::prelude::*;
use crate::syntax::expr::{parse_assignment_expression_or_higher, ExpressionContext};
use crate::syntax::js_parse_error;
use crate::ParsedSyntax::{Absent, Present};
use crate::{JsParser, ParseRecovery, ParsedSyntax};
use rome_js_syntax::JsSyntaxKi... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/syntax/module.rs | crates/rome_js_parser/src/syntax/module.rs | //! Implements the parsing logic for ES Module syntax
use crate::lexer::TextSize;
use crate::prelude::*;
use crate::state::{EnterAmbientContext, ExportDefaultItem, ExportDefaultItemKind};
use crate::syntax::binding::{
is_at_identifier_binding, is_nth_at_identifier_binding, parse_binding, parse_identifier_binding,
... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | true |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/syntax/typescript.rs | crates/rome_js_parser/src/syntax/typescript.rs | //! TypeScript specific functions.
use crate::prelude::*;
mod statement;
pub mod ts_parse_error;
mod types;
use crate::syntax::expr::{parse_identifier, parse_unary_expr, ExpressionContext};
use crate::syntax::js_parse_error::expected_expression;
use crate::syntax::typescript::ts_parse_error::expected_ts_type;
use cr... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/syntax/class.rs | crates/rome_js_parser/src/syntax/class.rs | use crate::parser::{ParsedSyntax, RecoveryResult};
use crate::prelude::*;
use crate::state::{
EnableStrictMode, EnterClassPropertyInitializer, EnterClassStaticInitializationBlock,
EnterParameters, SignatureFlags,
};
use crate::syntax::binding::parse_binding;
use crate::syntax::expr::{
parse_assignment_expre... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | true |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/syntax/function.rs | crates/rome_js_parser/src/syntax/function.rs | use crate::parser::ParsedSyntax;
use crate::prelude::*;
use crate::state::{EnterFunction, EnterParameters, SignatureFlags};
use crate::syntax::binding::{
is_at_identifier_binding, is_nth_at_identifier_binding, parse_binding, parse_binding_pattern,
};
use crate::syntax::class::{
empty_decorator_list, parse_initi... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | true |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/syntax/auxiliary.rs | crates/rome_js_parser/src/syntax/auxiliary.rs | use crate::prelude::*;
use crate::syntax::class::{parse_class_declaration, parse_decorators};
use crate::syntax::function::parse_function_declaration;
use crate::syntax::js_parse_error::decorators_not_allowed;
use crate::syntax::module::parse_import_or_import_equals_declaration;
use crate::syntax::stmt::{
is_nth_at... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/syntax/js_parse_error.rs | crates/rome_js_parser/src/syntax/js_parse_error.rs | //! Provides factory function to create common diagnostics for the JavaScript syntax
use crate::prelude::*;
use crate::span::Span;
use crate::JsParser;
use crate::JsSyntaxFeature::TypeScript;
use rome_js_syntax::TextRange;
use rome_parser::diagnostic::{expected_any, expected_node};
pub(crate) fn expected_function_bod... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/syntax/binding.rs | crates/rome_js_parser/src/syntax/binding.rs | use crate::prelude::*;
use crate::span::Span;
use crate::syntax::class::parse_initializer_clause;
use crate::syntax::expr::{is_nth_at_identifier, parse_identifier, ExpressionContext};
use crate::syntax::js_parse_error::{
expected_binding, expected_identifier, expected_object_member_name,
};
use crate::syntax::objec... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/syntax/assignment.rs | crates/rome_js_parser/src/syntax/assignment.rs | use crate::parser::rewrite_parser::{RewriteMarker, RewriteParser, RewriteToken};
use crate::parser::JsParserCheckpoint;
use crate::prelude::*;
use crate::rewrite::{rewrite_events, RewriteParseEvents};
use crate::syntax::class::parse_initializer_clause;
use crate::syntax::expr::{
is_at_identifier, parse_conditional_... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/syntax/stmt.rs | crates/rome_js_parser/src/syntax/stmt.rs | //! Statements, these include `if`, `while`, `for`, `;`, and more.
//!
//! See the [ECMAScript spec](https://www.ecma-international.org/ecma-262/5.1/#sec-12).
use super::binding::*;
use super::class::is_at_ts_abstract_class_declaration;
use super::expr::parse_expression;
use super::module::parse_export;
use super::typ... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | true |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/syntax/jsx/mod.rs | crates/rome_js_parser/src/syntax/jsx/mod.rs | use crate::prelude::*;
pub mod jsx_parse_errors;
use rome_js_syntax::JsSyntaxKind::*;
use rome_parser::diagnostic::expected_token;
use rome_parser::parse_lists::ParseNodeList;
use rome_rowan::TextRange;
use crate::lexer::{JsSyntaxKind, LexContext, ReLexContext, T};
use crate::syntax::expr::{
is_nth_at_identifier_... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/syntax/jsx/jsx_parse_errors.rs | crates/rome_js_parser/src/syntax/jsx/jsx_parse_errors.rs | use crate::prelude::*;
use crate::JsParser;
use rome_js_syntax::TextRange;
use rome_parser::diagnostic::{expected_any, expected_node};
pub(crate) fn jsx_expected_attribute(p: &JsParser, range: TextRange) -> ParseDiagnostic {
expected_node("JSX attribute", range).into_diagnostic(p)
}
pub(crate) fn jsx_expected_att... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/syntax/typescript/types.rs | crates/rome_js_parser/src/syntax/typescript/types.rs | use crate::parser::{RecoveryError, RecoveryResult};
use crate::prelude::*;
use crate::state::{EnterType, SignatureFlags};
use crate::syntax::expr::{
is_at_binary_operator, is_at_expression, is_at_identifier, is_nth_at_identifier,
is_nth_at_identifier_or_keyword, parse_big_int_literal_expression, parse_identifie... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | true |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/syntax/typescript/statement.rs | crates/rome_js_parser/src/syntax/typescript/statement.rs | use crate::parser::RecoveryResult;
use crate::prelude::*;
use crate::syntax::binding::{
is_nth_at_identifier_binding, parse_binding, parse_identifier_binding,
};
use crate::syntax::class::parse_initializer_clause;
use crate::syntax::expr::{is_nth_at_identifier, parse_name, ExpressionContext};
use super::ts_parse_e... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/syntax/typescript/ts_parse_error.rs | crates/rome_js_parser/src/syntax/typescript/ts_parse_error.rs | use crate::prelude::*;
use crate::JsParser;
use rome_diagnostics::location::AsSpan;
use rome_parser::diagnostic::{expected_any, expected_node};
use rome_rowan::TextRange;
pub(crate) fn expected_ts_enum_member(p: &JsParser, range: TextRange) -> ParseDiagnostic {
expected_any(&["identifier", "string literal", "compu... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/parser/rewrite_parser.rs | crates/rome_js_parser/src/parser/rewrite_parser.rs | use crate::parser::JsParser;
use crate::token_source::TokenSourceCheckpoint;
use crate::prelude::*;
use rome_console::fmt::Display;
use rome_diagnostics::location::AsSpan;
use rome_js_syntax::{JsSyntaxKind, TextRange};
use rome_parser::{
diagnostic::{ParseDiagnostic, ToDiagnostic},
event::Event,
CompletedM... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/parser/single_token_parse_recovery.rs | crates/rome_js_parser/src/parser/single_token_parse_recovery.rs | use crate::lexer::{JsSyntaxKind, T};
use crate::prelude::*;
use crate::JsParser;
use rome_parser::diagnostic::ParseDiagnostic;
/// This struct contains the information needed to the parser to recover from a certain error
///
/// By default it doesn't check curly braces, use [with_braces_included] to turn opt-in the ch... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/lexer/errors.rs | crates/rome_js_parser/src/lexer/errors.rs | use crate::prelude::*;
pub fn invalid_digits_after_unicode_escape_sequence(start: usize, end: usize) -> ParseDiagnostic {
ParseDiagnostic::new("invalid digits after unicode escape sequence", start..end)
.hint("expected valid unicode escape sequence")
}
| rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/lexer/buffered_lexer.rs | crates/rome_js_parser/src/lexer/buffered_lexer.rs | use super::{LexContext, Lexer, LexerCheckpoint, ReLexContext, TextRange, TokenFlags};
use rome_js_syntax::{JsSyntaxKind, JsSyntaxKind::EOF};
use rome_parser::diagnostic::ParseDiagnostic;
use std::collections::VecDeque;
use std::iter::FusedIterator;
/// Wrapper around a [Lexer] that supports lookahead.
///
/// The unde... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/lexer/highlight.rs | crates/rome_js_parser/src/lexer/highlight.rs | use crate::*;
pub use ansi_term::{self, ANSIGenericString, Color, Style};
use atty::is;
/// A structure for syntax highlighting pieces of JavaScript source code
/// using ANSI.
///
/// The highlighter will auto detect if stderr or stdout are terminals, if
/// they are not then it will return the original uncolored so... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/lexer/tests.rs | crates/rome_js_parser/src/lexer/tests.rs | #![cfg(test)]
#![allow(unused_mut, unused_variables, unused_assignments)]
use super::{LexContext, Lexer, TextSize};
use crate::span::Span;
use quickcheck_macros::quickcheck;
use rome_js_syntax::JsSyntaxKind::{self, EOF};
use std::sync::mpsc::channel;
use std::thread;
use std::time::Duration;
// Assert the result of l... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_js_parser/src/lexer/mod.rs | crates/rome_js_parser/src/lexer/mod.rs | //! An extremely fast, lookup table based, ECMAScript lexer which yields SyntaxKind tokens used by the rome-js parser.
//! For the purposes of error recovery, tokens may have an error attached to them, which is reflected in the Iterator Item.
//! The lexer will also yield `COMMENT` and `WHITESPACE` tokens.
//!
//! The ... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | true |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_formatter_test/src/snapshot_builder.rs | crates/rome_formatter_test/src/snapshot_builder.rs | use rome_diagnostics::console::fmt::{Formatter, Termcolor};
use rome_diagnostics::console::markup;
use rome_diagnostics::PrintDiagnostic;
use rome_diagnostics::{termcolor, DiagnosticExt};
use rome_formatter::Printed;
use rome_parser::AnyParse;
use std::ffi::OsStr;
use std::fmt;
use std::fmt::Write;
use std::path::Path;... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_formatter_test/src/test_prettier_snapshot.rs | crates/rome_formatter_test/src/test_prettier_snapshot.rs | use rome_rowan::{TextRange, TextSize};
use std::{ffi::OsStr, fs::read_to_string, ops::Range, path::Path};
use crate::check_reformat::CheckReformat;
use crate::snapshot_builder::{SnapshotBuilder, SnapshotOutput};
use crate::utils::{get_prettier_diff, strip_prettier_placeholders, PrettierDiff};
use crate::TestFormatLang... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_formatter_test/src/lib.rs | crates/rome_formatter_test/src/lib.rs | use rome_formatter::{
CstFormatContext, FormatContext, FormatLanguage, FormatOptions, FormatResult, Formatted,
Printed,
};
use rome_parser::AnyParse;
use rome_rowan::{Language, SyntaxNode, TextRange};
pub mod check_reformat;
pub mod diff_report;
pub mod snapshot_builder;
pub mod spec;
pub mod test_prettier_sna... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_formatter_test/src/diff_report.rs | crates/rome_formatter_test/src/diff_report.rs | use similar::{utils::diff_lines, Algorithm, ChangeTag};
use std::sync::Mutex;
use std::{env, fmt::Write, fs::write, os::raw::c_int, str::FromStr, sync::Once};
use serde::Serialize;
#[derive(Debug, PartialEq, Eq)]
enum ReportType {
Json,
Markdown,
}
#[derive(Debug, Clone, Default, Serialize)]
struct SingleFil... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_formatter_test/src/utils.rs | crates/rome_formatter_test/src/utils.rs | use crate::diff_report::DiffReport;
use similar::TextDiff;
use std::ffi::OsStr;
use std::fs::{read_to_string, remove_file};
use std::path::Path;
struct StripPlaceholders {
cursor: String,
range_start_placeholder: String,
range_end_placeholder: String,
}
/// Find and replace the cursor, range start and ran... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_formatter_test/src/check_reformat.rs | crates/rome_formatter_test/src/check_reformat.rs | use crate::TestFormatLanguage;
use rome_diagnostics::console::fmt::{Formatter, Termcolor};
use rome_diagnostics::console::markup;
use rome_diagnostics::termcolor;
use rome_diagnostics::{DiagnosticExt, PrintDiagnostic};
use rome_rowan::SyntaxNode;
/// Perform a second pass of formatting on a file, printing a diff if th... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_formatter_test/src/spec.rs | crates/rome_formatter_test/src/spec.rs | use crate::check_reformat::CheckReformat;
use crate::snapshot_builder::{SnapshotBuilder, SnapshotOutput};
use crate::utils::strip_rome_placeholders;
use crate::TestFormatLanguage;
use rome_console::EnvConsole;
use rome_formatter::{FormatOptions, Printed};
use rome_fs::RomePath;
use rome_parser::AnyParse;
use rome_rowan... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_text_size/src/lib.rs | crates/rome_text_size/src/lib.rs | //! Newtypes for working with text sizes/ranges in a more type-safe manner.
//!
//! This library can help with two things:
//! * Reducing storage requirements for offsets and ranges, under the
//! assumption that 32 bits is enough.
//! * Providing standard vocabulary types for applications where text ranges
//!... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_text_size/src/range.rs | crates/rome_text_size/src/range.rs | use cmp::Ordering;
use {
crate::TextSize,
std::{
cmp,
convert::TryFrom,
fmt,
ops::{Add, AddAssign, Bound, Index, IndexMut, Range, RangeBounds, Sub, SubAssign},
},
};
/// A range in text, represented as a pair of [`TextSize`][struct@TextSize].
///
/// It is a logic error for... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_text_size/src/traits.rs | crates/rome_text_size/src/traits.rs | use {crate::TextSize, std::convert::TryInto};
use priv_in_pub::Sealed;
mod priv_in_pub {
pub trait Sealed {}
}
/// Primitives with a textual length that can be passed to [`TextSize::of`].
pub trait TextLen: Copy + Sealed {
/// The textual length of this primitive.
fn text_len(self) -> TextSize;
}
impl Se... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_text_size/src/schemars_impls.rs | crates/rome_text_size/src/schemars_impls.rs | //! This module implements the [JsonSchema] trait from the [schemars] crate for
//! [TextSize] and [TextRange] if the `schemars` feature is enabled. This trait
//! exposes meta-information on how a given type is serialized and deserialized
//! using `serde`, and is currently used to generate autocomplete information
//... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_text_size/src/serde_impls.rs | crates/rome_text_size/src/serde_impls.rs | use {
crate::{TextRange, TextSize},
serde::{de, Deserialize, Deserializer, Serialize, Serializer},
};
impl Serialize for TextSize {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
self.raw.serialize(serializer)
}
}
impl<'de> Deserialize<'... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_text_size/src/size.rs | crates/rome_text_size/src/size.rs | use {
crate::TextLen,
std::{
convert::TryFrom,
fmt, iter,
num::TryFromIntError,
ops::{Add, AddAssign, Sub, SubAssign},
u32,
},
};
/// A measure of text length. Also, equivalently, an index into text.
///
/// This is a UTF-8 bytes offset stored as `u32`, but
/// most ... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_text_size/tests/serde.rs | crates/rome_text_size/tests/serde.rs | use {rome_text_size::*, serde_test::*, std::ops};
fn size(x: u32) -> TextSize {
TextSize::from(x)
}
fn range(x: ops::Range<u32>) -> TextRange {
TextRange::new(x.start.into(), x.end.into())
}
#[test]
fn size_serialization() {
assert_tokens(&size(00), &[Token::U32(00)]);
assert_tokens(&size(10), &[Toke... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_text_size/tests/contructors.rs | crates/rome_text_size/tests/contructors.rs | use rome_text_size::TextSize;
#[derive(Copy, Clone)]
struct BadRope<'a>(&'a [&'a str]);
impl BadRope<'_> {
fn text_len(self) -> TextSize {
self.0.iter().copied().map(TextSize::of).sum()
}
}
#[test]
fn main() {
let x: char = 'c';
let _ = TextSize::of(x);
let x: &str = "hello";
let _ =... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_text_size/tests/main.rs | crates/rome_text_size/tests/main.rs | use {rome_text_size::*, std::ops};
fn size(x: u32) -> TextSize {
TextSize::from(x)
}
fn range(x: ops::Range<u32>) -> TextRange {
TextRange::new(x.start.into(), x.end.into())
}
#[test]
fn sum() {
let xs: Vec<TextSize> = vec![size(0), size(1), size(2)];
assert_eq!(xs.iter().sum::<TextSize>(), size(3));... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_text_size/tests/indexing.rs | crates/rome_text_size/tests/indexing.rs | use rome_text_size::*;
#[test]
fn main() {
let range = TextRange::default();
let _ = &""[range];
let _ = &String::new()[range];
}
| rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_text_size/tests/auto_traits.rs | crates/rome_text_size/tests/auto_traits.rs | use {
rome_text_size::*,
static_assertions::*,
std::{
fmt::Debug,
hash::Hash,
marker::{Send, Sync},
panic::{RefUnwindSafe, UnwindSafe},
},
};
// auto traits
assert_impl_all!(TextSize: Send, Sync, Unpin, UnwindSafe, RefUnwindSafe);
assert_impl_all!(TextRange: Send, Sync, ... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_syntax/src/lib.rs | crates/rome_json_syntax/src/lib.rs | #[macro_use]
mod generated;
mod file_source;
pub mod member_ext;
pub mod string_ext;
mod syntax_node;
pub use self::generated::*;
pub use file_source::JsonFileSource;
pub use rome_rowan::{TextLen, TextRange, TextSize, TokenAtOffset, TriviaPieceKind, WalkEvent};
pub use syntax_node::*;
use rome_rowan::{RawSyntaxKind, ... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_syntax/src/syntax_node.rs | crates/rome_json_syntax/src/syntax_node.rs | //! This module defines the Concrete Syntax Tree used by Rome.
//!
//! 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 the... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_syntax/src/file_source.rs | crates/rome_json_syntax/src/file_source.rs | use crate::JsonLanguage;
use rome_rowan::{FileSource, FileSourceError};
use std::path::Path;
#[derive(Debug, Default)]
pub struct JsonFileSource {
#[allow(dead_code)]
variant: JsonVariant,
}
#[derive(Debug, Default)]
enum JsonVariant {
#[default]
Standard,
#[allow(dead_code)]
Jsonc,
}
impl Js... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_syntax/src/member_ext.rs | crates/rome_json_syntax/src/member_ext.rs | use crate::{inner_string_text, JsonMemberName};
use rome_rowan::{SyntaxResult, TokenText};
impl JsonMemberName {
pub fn inner_string_text(&self) -> SyntaxResult<TokenText> {
Ok(inner_string_text(&self.value_token()?))
}
}
| rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_syntax/src/string_ext.rs | crates/rome_json_syntax/src/string_ext.rs | use crate::{inner_string_text, JsonStringValue};
use rome_rowan::{SyntaxResult, TokenText};
impl JsonStringValue {
pub fn inner_string_text(&self) -> SyntaxResult<TokenText> {
Ok(inner_string_text(&self.value_token()?))
}
}
| rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_syntax/src/generated.rs | crates/rome_json_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 | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_syntax/src/generated/nodes_mut.rs | crates/rome_json_syntax/src/generated/nodes_mut.rs | //! Generated file, do not edit by hand, see `xtask/codegen`
use crate::{generated::nodes::*, JsonSyntaxToken as SyntaxToken};
use rome_rowan::AstNode;
use std::iter::once;
impl JsonArrayValue {
pub fn with_l_brack_token(self, element: SyntaxToken) -> Self {
Self::unwrap_cast(
self.syntax
... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_syntax/src/generated/kind.rs | crates/rome_json_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 JsonSyntaxK... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_syntax/src/generated/macros.rs | crates/rome_json_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 | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_json_syntax/src/generated/nodes.rs | crates/rome_json_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,
JsonLanguage as Language, JsonSyntaxElement as SyntaxElement,
JsonSyntaxElementChildren as SyntaxElementChildren,
JsonSynt... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | true |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/settings.rs | crates/rome_service/src/settings.rs | use crate::{
configuration::FilesConfiguration, Configuration, ConfigurationDiagnostic, MatchOptions,
Matcher, Rules, WorkspaceError,
};
use indexmap::IndexSet;
use rome_diagnostics::Category;
use rome_formatter::{IndentStyle, LineWidth};
use rome_fs::RomePath;
use rome_js_syntax::JsLanguage;
use rome_json_synt... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/workspace.rs | crates/rome_service/src/workspace.rs | //! The [Workspace] is the main entry point for high-level clients (the Rome
//! CLI and Language Server) into the various language-specific services of the
//! Rome toolchain (parser, formatter, analyzer ...)
//!
//! # Documents
//!
//! A [Workspace] instance operates on a set of open documents managed by one
//! or m... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/diagnostics.rs | crates/rome_service/src/diagnostics.rs | use crate::file_handlers::Language;
use crate::ConfigurationDiagnostic;
use rome_console::fmt::Bytes;
use rome_console::markup;
use rome_diagnostics::{category, Category, Diagnostic, DiagnosticTags, Location, Severity, Visit};
use rome_formatter::{FormatError, PrintError};
use rome_fs::FileSystemDiagnostic;
use rome_js... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/lib.rs | crates/rome_service/src/lib.rs | use rome_console::Console;
use rome_fs::{FileSystem, OsFileSystem};
use serde::{Deserialize, Serialize};
use std::ops::{Deref, DerefMut};
pub mod configuration;
pub mod file_handlers;
pub mod matcher;
pub mod settings;
pub mod workspace;
mod diagnostics;
#[cfg(feature = "schema")]
pub mod workspace_types;
pub use cr... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/workspace_types.rs | crates/rome_service/src/workspace_types.rs | //! Utility functions to help with generating bindings for the [Workspace] API
use std::collections::{HashSet, VecDeque};
use rome_js_syntax::{AnyJsDeclaration, AnyTsTupleTypeElement};
use schemars::{
gen::{SchemaGenerator, SchemaSettings},
schema::{InstanceType, RootSchema, Schema, SchemaObject, SingleOrVec}... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/matcher/pattern.rs | crates/rome_service/src/matcher/pattern.rs | use crate::matcher::pattern::CharSpecifier::{CharRange, SingleChar};
use crate::matcher::pattern::MatchResult::{
EntirePatternDoesntMatch, Match, SubPatternDoesntMatch,
};
use crate::matcher::pattern::PatternToken::{
AnyChar, AnyExcept, AnyRecursiveSequence, AnySequence, AnyWithin, Char,
};
use std::error::Erro... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | true |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/matcher/mod.rs | crates/rome_service/src/matcher/mod.rs | pub mod pattern;
pub use pattern::{MatchOptions, Pattern, PatternError};
use rome_console::markup;
use rome_diagnostics::Diagnostic;
use std::collections::HashMap;
use std::path::Path;
use std::sync::RwLock;
/// A data structure to use when there's need to match a string or a path a against
/// a unix shell style pat... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/workspace/client.rs | crates/rome_service/src/workspace/client.rs | use crate::workspace::{
FileFeaturesResult, GetFileContentParams, IsPathIgnoredParams, OrganizeImportsParams,
OrganizeImportsResult, RageParams, RageResult, ServerInfo,
};
use crate::{TransportError, Workspace, WorkspaceError};
use rome_formatter::Printed;
use serde::{de::DeserializeOwned, Deserialize, Serializ... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/workspace/server.rs | crates/rome_service/src/workspace/server.rs | use super::{
ChangeFileParams, CloseFileParams, FeatureName, FixFileResult, FormatFileParams,
FormatOnTypeParams, FormatRangeParams, GetControlFlowGraphParams, GetFormatterIRParams,
GetSyntaxTreeParams, GetSyntaxTreeResult, OpenFileParams, PullActionsParams, PullActionsResult,
PullDiagnosticsParams, Pul... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/configuration/merge.rs | crates/rome_service/src/configuration/merge.rs | /// Simple trait to merge two types of the same type
pub trait MergeWith<T> {
/// Merges one type with another
fn merge_with(&mut self, other: T);
/// Merges one type with another, if the condition is met
fn merge_with_if(&mut self, other: T, condition: bool) {
if condition {
self.m... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/configuration/javascript.rs | crates/rome_service/src/configuration/javascript.rs | use crate::configuration::merge::MergeWith;
use bpaf::Bpaf;
use rome_deserialize::StringSet;
use rome_js_formatter::context::{
trailing_comma::TrailingComma, ArrowParentheses, QuoteProperties, QuoteStyle, Semicolons,
};
use serde::{Deserialize, Serialize};
#[derive(Default, Debug, Deserialize, Serialize, Eq, Parti... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/configuration/diagnostics.rs | crates/rome_service/src/configuration/diagnostics.rs | use crate::WorkspaceError;
use rome_console::fmt::Display;
use rome_console::{markup, MarkupBuf};
use rome_deserialize::DeserializationDiagnostic;
use rome_diagnostics::{
Advices, Category, Diagnostic, DiagnosticTags, Location, LogCategory, MessageAndDescription,
Severity, Visit,
};
use rome_rowan::SyntaxError;... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/configuration/vcs.rs | crates/rome_service/src/configuration/vcs.rs | use crate::configuration::merge::MergeWith;
use bpaf::Bpaf;
use serde::{Deserialize, Serialize};
use std::str::FromStr;
const GIT_IGNORE_FILE_NAME: &str = ".gitignore";
/// Set of properties to integrate Rome with a VCS software.
#[derive(Debug, Default, Deserialize, Serialize, Clone, Bpaf)]
#[cfg_attr(feature = "sch... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/configuration/json.rs | crates/rome_service/src/configuration/json.rs | use crate::configuration::merge::MergeWith;
use bpaf::Bpaf;
use serde::{Deserialize, Serialize};
#[derive(Default, Debug, Deserialize, Serialize, Eq, PartialEq, Clone, Bpaf)]
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[serde(default, deny_unknown_fields)]
pub struct JsonConfiguration {
#[serde(... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/configuration/organize_imports.rs | crates/rome_service/src/configuration/organize_imports.rs | use crate::configuration::merge::MergeWith;
use crate::settings::OrganizeImportsSettings;
use crate::{ConfigurationDiagnostic, MatchOptions, Matcher, WorkspaceError};
use bpaf::Bpaf;
use rome_deserialize::StringSet;
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize, Eq, PartialEq, Clone, Bpaf... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/configuration/mod.rs | crates/rome_service/src/configuration/mod.rs | //! This module contains the configuration of `rome.json`
//!
//! The configuration is divided by "tool", and then it's possible to further customise it
//! by language. The language might further options divided by tool.
pub mod diagnostics;
pub mod formatter;
mod generated;
pub mod javascript;
pub mod json;
pub mod l... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/configuration/formatter.rs | crates/rome_service/src/configuration/formatter.rs | use crate::configuration::merge::MergeWith;
use crate::settings::FormatSettings;
use crate::{ConfigurationDiagnostic, MatchOptions, Matcher, WorkspaceError};
use bpaf::Bpaf;
use rome_deserialize::StringSet;
use rome_formatter::{IndentStyle, LineWidth};
use serde::{Deserialize, Serialize};
use std::str::FromStr;
/// Op... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/configuration/generated.rs | crates/rome_service/src/configuration/generated.rs | //! Generated file, do not edit by hand, see `xtask/codegen`
use crate::configuration::linter::*;
use crate::{RuleConfiguration, Rules};
use rome_analyze::{AnalyzerRules, MetadataRegistry};
pub(crate) fn push_to_analyzer_rules(
rules: &Rules,
metadata: &MetadataRegistry,
analyzer_rules: &mut AnalyzerRules,... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/configuration/parse/mod.rs | crates/rome_service/src/configuration/parse/mod.rs | mod json;
| rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/configuration/parse/json/linter.rs | crates/rome_service/src/configuration/parse/json/linter.rs | use crate::configuration::linter::{RulePlainConfiguration, RuleWithOptions};
use crate::configuration::LinterConfiguration;
use crate::{RuleConfiguration, Rules};
use rome_console::markup;
use rome_deserialize::json::{has_only_known_keys, with_only_known_variants, VisitJsonNode};
use rome_deserialize::{DeserializationD... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/configuration/parse/json/javascript.rs | crates/rome_service/src/configuration/parse/json/javascript.rs | use crate::configuration::javascript::{JavascriptOrganizeImports, JavascriptParser};
use crate::configuration::{JavascriptConfiguration, JavascriptFormatter};
use rome_deserialize::json::{has_only_known_keys, VisitJsonNode};
use rome_deserialize::{DeserializationDiagnostic, StringSet, VisitNode};
use rome_js_formatter:... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/crates/rome_service/src/configuration/parse/json/configuration.rs | crates/rome_service/src/configuration/parse/json/configuration.rs | use crate::configuration::json::JsonConfiguration;
use crate::configuration::organize_imports::OrganizeImports;
use crate::configuration::parse::json::vcs::validate_vcs_configuration;
use crate::configuration::vcs::VcsConfiguration;
use crate::configuration::{
FilesConfiguration, FormatterConfiguration, JavascriptC... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.