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

Adds support to change the line comment prefix #53

Merged
merged 6 commits into from
Jan 20, 2021

Conversation

chribjel
Copy link
Contributor

This pull request adds an extension setting that enables the user to change which symbol(s) to use as a line comment prefix. It also adds highlighting for '#' by default. The default prefix is still ';' as to not break any configurations by previous users of the extension.

@maziac
Copy link
Owner

maziac commented Jan 18, 2021

Which assembler does use '#'?

@maziac
Copy link
Owner

maziac commented Jan 18, 2021

For me the change does not work. I mean the asm.json is working.
But it is not possible to change the line comment character.

@chribjel
Copy link
Contributor Author

chribjel commented Jan 19, 2021

Which assembler does use '#'?

AT&T syntax for i386. At least the one we use at University

But i will look into it more to make it work on all platforms!

@chribjel
Copy link
Contributor Author

It looks like the npm preLaunchTask that compiles the files are commented out, and I might suspect that the files may have not been compiled when you tested it. I uncommented that line with the latest commit.

@maziac
Copy link
Owner

maziac commented Jan 19, 2021

No, that doesn't help either. Here I try to change the comment name but nothing happens:
2021-01-19 18 00 42
I also don't understand how this should work.
There is the grammar in asm.json for all three ':', '//' and '#'.
How should the selection work?

@chribjel
Copy link
Contributor Author

This is what i mean. When you use the keybind for adding line comment in vs code, it changes what symbol is inserted.

This pull request does not change all the characters to the desired symbol.

Sorry if that was unclear.

asm-comment-demo

@maziac
Copy link
Owner

maziac commented Jan 19, 2021

O, I misunderstood.

@maziac maziac merged commit 0f0841a into maziac:master Jan 20, 2021
@maziac
Copy link
Owner

maziac commented Jan 20, 2021

I have now merged your PR.
Thanks very much for contributing.

@maziac
Copy link
Owner

maziac commented Feb 5, 2021

please have a look here:
#54

Seems that # is used also for hex numbers.

I think I will change the # grammar so that you need to enter a whitespace after the #, e.g.
" # comment"
but not
" #comment"
anymore.

@chribjel
Copy link
Contributor Author

chribjel commented Feb 5, 2021

Yes, I was not aware of that. Good catch! This should be fixed.

@maziac
Copy link
Owner

maziac commented Dec 4, 2021

Hi, I forgot to ask that. Can you add a statement in the comments that your code is MIT licensed.

@chribjel
Copy link
Contributor Author

Hi, I forgot to ask that. Can you add a statement in the comments that your code is MIT licensed.

Not sure i understand. Where should i put this statement?

@maziac
Copy link
Owner

maziac commented Dec 10, 2021

Just here. Re-assuring that I can use your code :-)

@chribjel
Copy link
Contributor Author

Just here. Re-assuring that I can use your code :-)

Ah understand! Yes, you can definitely use my code, and it is MIT licensed :)

@maziac
Copy link
Owner

maziac commented Dec 10, 2021

Thanks

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