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

Many added mnemonics and fixes #5

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

PRESFIL
Copy link

@PRESFIL PRESFIL commented Jul 25, 2016

Some significant fixes )) All fixes see in previous commits

kdekaluga and others added 5 commits May 14, 2016 14:28
Added missing registers (X, Y, Z, PC, ZERO), missing instructions (adiw, icall), #-directives
Labels after jump command (e.g. rjmp, brcs, etc.) are now colored.
Update avr-asm.tmLanguage
Added: Commands: adiw, mul, muls, mulsu, fmul, fmuls, mfulsu, eijmp, jmp, icall, eicall, call, elpm, espm.
Added: Directives: elseif, word, warning.
Fixed: Conflicts[]:
Fixed: Conflicts[]: 
- 1. Between ".cseg" and ".csegsize"
- 2. Between ".endm" and ".endmacro"
- 3. Between ".elif"/".else" and ".elseif"
- 4. Between ".if" and ".ifdef"/".ifndef"
- 5. Between ".list" and ".listmac"
{
"match": "(?i)\\br(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)\\b",
"match": "(?i)\\bR(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)\\b",
Copy link
Owner

@vyivanov vyivanov Sep 28, 2016

Choose a reason for hiding this comment

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

Why did you make uppercase for general purpose registers? This does not take effect because regex is configured with ?i (case insensitive mode).

{
"match": "(?i)\\b(xl|xh|yl|yh|zl|zh)\\b",
"match": "(?i)\\b(XL|XH|YL|YH|ZL|ZH)\\b",
Copy link
Owner

Choose a reason for hiding this comment

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

The same as previous comment.

{
"match": "(?i)(^|\\s)\\.(byte|cseg|csegsize|db|dd|def|device|dq|dseg|dw|elif|else|endif|endm|endmacro|equ|error|eseg|exit|if|ifdef|ifndef|include|list|listmac|macro|message|nolist|org|set|undef)",
"match": "(?i)(^|\\s)\\.(byte|csegsize|cseg|db|dd|def|device|dq|dseg|dw|elseif|elif|else|endif|endmacro|endm|equ|error|eseg|exit|ifdef|ifndef|if|include|listmac|list|macro|message|nolist|org|set|undef|word|warning)",
Copy link
Owner

Choose a reason for hiding this comment

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

I guess you're trying to fix problem with partial highlighting of several directives. Proper fix is to wrap this match with \b regex anchor like this was done with mnemonics.

@@ -137,7 +168,7 @@
<key>comment</key>
<string>Dec number constant</string>
<key>match</key>
<string>\b(0|[1-9]\d+)\b</string>
<string>\-?\b(\d+)\b</string>
Copy link
Owner

Choose a reason for hiding this comment

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

Don't try to directly edit *.tmLanguage file. Your changes will be lost since the file is generated from *.JSON-tmLanguage one.

@vyivanov vyivanov self-assigned this Sep 28, 2016
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.

4 participants