diff --git a/app/src/doc.cgi/.project b/app/src/doc.cgi/.project index 90820711b..a3904d174 100644 --- a/app/src/doc.cgi/.project +++ b/app/src/doc.cgi/.project @@ -1,5 +1,5 @@ # Gambas Project File 3.0 -# Compiled with Gambas 2.99.0 (r2317) +# Compiled with Gambas 2.99.0 (r2352) Title=Gambas documentation CGI script Startup=Main Icon=help.png diff --git a/app/src/doc.cgi/.src/Main.module b/app/src/doc.cgi/.src/Main.module index c9673a945..1b4220ff8 100644 --- a/app/src/doc.cgi/.src/Main.module +++ b/app/src/doc.cgi/.src/Main.module @@ -982,7 +982,7 @@ Private Function Encode(sText As String) As String $sRes &= GetVersion() Continue - Case "only-in" + Case "only-in", "only" $sRes &= GetOnlyIn(sArg) Continue diff --git a/main/gbc/gbc_read.c b/main/gbc/gbc_read.c index a400dcf25..4fe7eedc6 100644 --- a/main/gbc/gbc_read.c +++ b/main/gbc/gbc_read.c @@ -550,7 +550,9 @@ static void add_identifier(bool no_res) last_type = (flag & RSF_ILT) != 0; if (flag & RSF_ILDD) { - if (RES_get_ident_flag(PATTERN_index(get_last_last_pattern())) & RSF_ILD) + PATTERN last_last_pattern = get_last_last_pattern(); + + if (PATTERN_is_reserved(last_last_pattern) && RES_get_ident_flag(PATTERN_index(last_last_pattern)) & RSF_ILD) last_declare = TRUE; flag &= ~RSF_ILDD; // flag == 0 means we can read a subroutine! } diff --git a/main/lib/eval/eval_read.c b/main/lib/eval/eval_read.c index e57bb9b20..fc7b05d59 100644 --- a/main/lib/eval/eval_read.c +++ b/main/lib/eval/eval_read.c @@ -234,6 +234,14 @@ static void add_pattern(int type, int index) #endif +static PATTERN get_last_last_pattern() +{ + if (EVAL->pattern_count > 1) + return EVAL->pattern[EVAL->pattern_count - 2]; + else + return NULL_PATTERN; +} + static PATTERN get_last_pattern() { if (EVAL->pattern_count > 0) @@ -446,7 +454,14 @@ static void add_identifier(bool no_res) last_func = (flag & RSF_ILF) != 0; last_declare = (flag & RSF_ILD) != 0; last_type = (flag & RSF_ILT) != 0; - //last_event = flag & RSF_ILE; + if (flag & RSF_ILDD) + { + PATTERN last_last_pattern = get_last_last_pattern(); + + if (PATTERN_is_reserved(last_last_pattern) && RES_get_ident_flag(PATTERN_index(last_last_pattern)) & RSF_ILD) + last_declare = TRUE; + flag &= ~RSF_ILDD; // flag == 0 means we can read a subroutine! + } } else {