You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parser skips comments as a build-in feature. Comment style is hardly declared.
Due to language mixing, there are cases which one language interferes with the features of another language, for example js variables within HTML comment eg <!-- ${var} -->. As js parses from the very beginning it may throw error if var is not declared, etc. Coder should have an opportunity to instruct parser when it meets <!----> to skip them like they were js comments. In that case HTML comment style is not violated.
This would be done by two techniques:
Either coder dynamically declares new styles of comments eg ('<!--', '-->').newComment(), ('<!--', '-->').removeComment, or
Parser provides general switch functions eg parsenOff(), parserOnso that a coder can write within a bs file parserOff() <!-- ${var} --> parserOn
This discussion was converted from issue #53 on February 17, 2023 23:06.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Parser skips comments as a build-in feature. Comment style is hardly declared.
Due to language mixing, there are cases which one language interferes with the features of another language, for example
js
variables withinHTML
comment eg<!-- ${var} -->
. Asjs
parses from the very beginning it may throw error ifvar
is not declared, etc. Coder should have an opportunity to instruct parser when it meets<!--
-->
to skip them like they werejs
comments. In that caseHTML
comment style is not violated.This would be done by two techniques:
('<!--', '-->').newComment()
,('<!--', '-->').removeComment
, orparsenOff()
,parserOn
so that a coder can write within abs
fileparserOff() <!-- ${var} --> parserOn
Beta Was this translation helpful? Give feedback.
All reactions