Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatted String Literals #5123

Merged
merged 1 commit into from
May 31, 2024
Merged

Formatted String Literals #5123

merged 1 commit into from
May 31, 2024

Conversation

mattnibs
Copy link
Collaborator

@mattnibs mattnibs commented May 14, 2024

The commit removes the template literals and replaces them with formatted string literals. F-strings have a similar functionality but the expression substitution only happens on strings prefixed with the 'f' character.

Fixes #4444

@mattnibs mattnibs force-pushed the f-strings branch 3 times, most recently from 30065a7 to 4cb17a4 Compare May 14, 2024 18:45
@mattnibs mattnibs requested a review from a team May 14, 2024 19:15
Copy link
Contributor

@philrz philrz left a comment

Choose a reason for hiding this comment

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

I looked over all the docs changes and made one small suggestion but overall looks good! 👍

@philrz philrz requested a review from a team May 14, 2024 22:04
@philrz philrz assigned philrz and unassigned philrz May 14, 2024
Copy link
Member

@nwt nwt left a comment

Choose a reason for hiding this comment

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

parser.peg at eb58396 is broken for me. Is it broken for you as well?

$ make -C compiler/parser
/Users/noah/brimdata/zed/compiler/parser/deps/bin/pigeon -support-left-recursion -o parser.go parser.peg
format error:  filename:15114:53: missing ',' before newline in argument list (and 10 more errors)
make: *** [parser.go] Error 6

zfmt/ast.go Outdated Show resolved Hide resolved
zfmt/ast.go Outdated Show resolved Hide resolved
zfmt/ast.go Outdated Show resolved Hide resolved
docs/tutorials/zq.md Outdated Show resolved Hide resolved
compiler/parser/parser.peg Show resolved Hide resolved
docs/language/expressions.md Outdated Show resolved Hide resolved
compiler/ztests/fstring.yaml Outdated Show resolved Hide resolved
compiler/ast/ast.go Outdated Show resolved Hide resolved
compiler/ast/ast.go Outdated Show resolved Hide resolved
compiler/ast/ast.go Outdated Show resolved Hide resolved
@mattnibs
Copy link
Collaborator Author

parser.peg at eb58396 is broken for me. Is it broken for you as well?

$ make -C compiler/parser
/Users/noah/brimdata/zed/compiler/parser/deps/bin/pigeon -support-left-recursion -o parser.go parser.peg
format error:  filename:15114:53: missing ',' before newline in argument list (and 10 more errors)
make: *** [parser.go] Error 6

You are right! Will fix...

@mattnibs mattnibs requested a review from nwt May 24, 2024 07:19
@nwt nwt force-pushed the positional-sem-errors branch 2 times, most recently from e8f887c to 0adda42 Compare May 31, 2024 20:27
@mattnibs mattnibs force-pushed the positional-sem-errors branch 3 times, most recently from 6a7a54b to 280ebf1 Compare May 31, 2024 21:15
Base automatically changed from positional-sem-errors to main May 31, 2024 21:22
Copy link
Member

@nwt nwt left a comment

Choose a reason for hiding this comment

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

:shipit: after fixing those last few typos.

compiler/ast/ast.go Outdated Show resolved Hide resolved
zfmt/ast.go Outdated Show resolved Hide resolved
The commit removes the template literals and replaces them with
formatted string literals. F-strings have a similar functionality but
the expression substitution only happens on strings prefixed with the
'f' character.
@mattnibs mattnibs merged commit b43cd0a into main May 31, 2024
4 checks passed
@mattnibs mattnibs deleted the f-strings branch May 31, 2024 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

String interpolation clash causing named capture group fail in regexp_replace()
3 participants