<p></p>
<p dir="auto">Implementing the whole grammar has problems for this use-case, not only speed, but also robustness.  It is being used on files that are being edited and may be eronneous or incomplet.</p>
<p dir="auto">Unless the parser can recover from an error it is going to lose all or many symbols in more cases if it parses things that are not essential to detecting the tags since it will then find more errors.  It is a problem with many languages, not just kotlin (see for example <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1019718027" data-permission-text="Title is private" data-url="https://github.com/geany/geany/issues/2916" data-hovercard-type="issue" data-hovercard-url="/geany/geany/issues/2916/hovercard" href="https://github.com/geany/geany/issues/2916">#2916</a>), but the fact many tag parsers skip lots of code reduces the impact of partly edited code (outside of declarations).</p>
<p dir="auto">This is also why full fat IDEs to try to insist that at least the the structural syntax is complete (eg {}s match) so their parsers have some handles to resync and recover after errors.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/3034#issuecomment-987714843">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJZ4DVBVGSSUKWB5F63UPXFENANCNFSM5I7MRDJA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AAIOWJZMO53PROPY2VCXZYLUPXFENA5CNFSM5I7MRDJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHLPVKGY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/3034#issuecomment-987714843",
"url": "https://github.com/geany/geany/pull/3034#issuecomment-987714843",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>