<p></p>
<blockquote>
<p dir="auto">Ok, well I just checked and Python also allows use before "declare" (assignment)</p>
</blockquote>
<p dir="auto">Yeah, makes sense with dynamic language like Python.</p>
<p dir="auto">Well, we could have one more callback function in <code class="notranslate">tm_parser.c</code> like</p>
<pre class="notranslate"><code class="notranslate">gboolean tm_parser_var_valid_after_declare(TMParserType lang)
{
    if (lang == TM_PARSER_PYTHON)
        return FALSE;
    return TRUE;
}
</code></pre>
<p dir="auto">and make the check based on the return value of this function.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/3175#issuecomment-1112766196">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJYMB24CZM7LLW7F3CDVHMSL3ANCNFSM5T5CX5RA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAIOWJ4A2J6IQHJ76XXYZLLVHMSL3A5CNFSM5T5CX5RKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIJJXN5A.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><geany/geany/pull/3175/c1112766196</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/3175#issuecomment-1112766196",
"url": "https://github.com/geany/geany/pull/3175#issuecomment-1112766196",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>