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

Inline-C: inline c on last line misses semicolon (with no newline at end) #615

Open
GWRon opened this issue Mar 20, 2023 · 1 comment
Open

Comments

@GWRon
Copy link
Contributor

GWRon commented Mar 20, 2023

SuperStrict
Framework Brl.StandardIO

'!printf("hello");
	'what?
'!printf("I said hello");
'remove the comment to make it break

Remove the last line comment and the generated code becomes:

...
		#line 4 "/home/ronny/Arbeit/Tools/BlitzMaxNG/tmp/untitled1.bmx"
		printf("hello");
		#line 6 "/home/ronny/Arbeit/Tools/BlitzMaxNG/tmp/untitled1.bmx"
		printf("I said hello")
		return 0;
...

It misses to add the ";" to the second printf;

It might indicate a bug when reading "comments" (until EOF is reached)

@GWRon
Copy link
Contributor Author

GWRon commented Mar 20, 2023

Yeah ... if you add a "newline" after the inline comment it runs flawless, but moving the cursor right behind the ";" of the second printf ... it fails

SuperStrict
Framework Brl.StandardIO

'!printf("hello");
	'what?
'!printf("I said hello");| <--- cursor here!

@GWRon GWRon changed the title Inline-C: inline c on last line misses semicolon Inline-C: inline c on last line misses semicolon (with no newline at end) Mar 20, 2023
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

No branches or pull requests

1 participant