Skip to content

Conversation

@sulincix
Copy link

meson builder sript nanorc support added.



# Variables
color cyan "\<\$\{[A-Za-z0-9_]+\}\>"
Copy link
Collaborator

@davidhcefx davidhcefx May 26, 2024

Choose a reason for hiding this comment

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

My variable failed to be highlighted as cyan
image

I think you have to remove the \< and \> if the inner part is not a "word".
Please read what those escapes actually do: https://www.gnu.org/software/findutils/manual/html_node/find_html/posix_002dextended-regular-expression-syntax.html


# Targets
color green "\<command|description|generator|pool|restat|deps|depfile|DEPFILE_UNQUOTED|ARGS|DESC|COMMAND|DEPFILE|LINK_ARGS|IMPLIB\>"
color red "\<|\$in|\$out|\$[a-zA-Z_]*|=|\>"
Copy link
Collaborator

@davidhcefx davidhcefx May 26, 2024

Choose a reason for hiding this comment

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

line 13
Do you mean

\<(command|description|generator|pool|restat|deps|depfile|DEPFILE_UNQUOTED|ARGS|DESC|COMMAND|DEPFILE|LINK_ARGS|IMPLIB)\>

?
Please add parenthesis around rules joined with the OR |.

line 14
I think you should change to (\$in|\$out|\$[a-zA-Z_]+)\>.
If you also want to color the symbol = in red, I'll suggest add another new line below to simplify the whole thing:

color red "="

# Targets
color green "\<command|description|generator|pool|restat|deps|depfile|DEPFILE_UNQUOTED|ARGS|DESC|COMMAND|DEPFILE|LINK_ARGS|IMPLIB\>"
color red "\<|\$in|\$out|\$[a-zA-Z_]*|=|\>"
color blue "\<|build .*:|\>"
Copy link
Collaborator

@davidhcefx davidhcefx May 26, 2024

Choose a reason for hiding this comment

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

line 15
You've added an extra OR | at the beginning, which will cause "build" allowable to be part of another word, which is not correct.
Also please remove the ending | and \>.

@davidhcefx
Copy link
Collaborator

@sulincix ping?

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.

2 participants