Skip to content
This repository was archived by the owner on Jul 28, 2023. It is now read-only.

#![dialect(NAME_DIALECT)]#150

Merged
RIg410 merged 3 commits intomasterfrom
attr_dialect
Oct 25, 2021
Merged

#![dialect(NAME_DIALECT)]#150
RIg410 merged 3 commits intomasterfrom
attr_dialect

Conversation

@vladimirovmm
Copy link
Copy Markdown
Contributor

No description provided.

@vladimirovmm vladimirovmm requested a review from boozook October 19, 2021 14:53
@vladimirovmm vladimirovmm self-assigned this Oct 19, 2021
@vladimirovmm vladimirovmm linked an issue Oct 19, 2021 that may be closed by this pull request
@vladimirovmm vladimirovmm marked this pull request as ready for review October 20, 2021 13:04

fn attr_dialect<'b>(dialect_project: &str, source: Cow<'b, str>) -> Cow<'b, str> {
fn pr(dialect_project: &str, source: String, start: usize) -> String {
let rg = Regex::new(r"\#!\[dialect\((?P<name>\w+)\)\]\s").unwrap();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make it lazy static.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RIg410 Thanks. Fixed

}
}

fn attr_dialect<'b>(dialect_project: &str, source: Cow<'b, str>) -> Cow<'b, str> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code should not be cut out, but replaced with spaces, otherwise the layout of errors will break.
Also, if you use a replacement, you will not be able to create new String)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RIg410 Thanks. Fixed

@vladimirovmm vladimirovmm requested a review from RIg410 October 25, 2021 10:18
@RIg410 RIg410 merged commit db0dbc3 into master Oct 25, 2021
@RIg410 RIg410 deleted the attr_dialect branch October 25, 2021 12:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: conditional compilation

2 participants