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
Comments before the first line of code are removed [CORE6466] #6698
Comments
Commented by: @mrotteveel As another datapoint: when there is no declare statement, the comment is preserved. |
Modified by: @mrotteveel |
Commented by: @asfernandes This bug is not reproducible in master but looks like only due to internal and unrelated parser changes to support sub routines. |
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: @asfernandes Comments at the end are also suppressed. My understand is that as comments are not tokens, they may be tied to token before or after it. We must tie them to both and when creating the source string the code gets the initial token (with their leading) comments and the final token (with their trailing comments) |
Modified by: @asfernandesVersion: 3.0.7 [ 10940 ] Version: 4.0 Beta 2 [ 10888 ] summary: Seems Firebird removes comments before the first line of code => Comments before the first line of code are removed |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0.8 [ 10960 ] |
Modified by: @asfernandesFix Version: 3.0.8 [ 10960 ] |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: No test => Done successfully |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Sergio Toniutti (sergiot_ericed.it)
Is duplicated by CORE6467
Seems Firebird removes comments before the first line of code when i execute create or alter procedure.
If i have:
SET TERM ^^ ;
CREATE OR ALTER PROCEDURE P_INC (
INT_A Integer)
returns (
INT_B Integer)
AS
/*
this is a bug!
*/
declare variable int_c integer=2;
begin
/* code */
int_b=int_a+int_c+2;
suspend;
end ^^
SET TERM ; ^^
the result is:
SET TERM ^^ ;
CREATE OR ALTER PROCEDURE P_INC (
INT_A Integer)
returns (
INT_B Integer)
AS
declare variable int_c integer=2;
begin
/* code */
int_b=int_a+int_c+2;
suspend;
end ^^
SET TERM ; ^^
Thanks,
Sergio
Commits: 32e7474 a8e6309 820fd7e 7811862 dfcb0ba c26edb9
The text was updated successfully, but these errors were encountered: