Closed hyyan closed 1 year ago
@hyyan Block comments are not supported in BBx because a block comment need a start and end char sequence. I will enable single line comments for now.
Block comments are not supported in BBx because a block comment need a start and end char sequence
BBx part is understood. The starting sequence is rem /**
and the end one is rem */
@hyyan Will following code be accepted as multiline comment in your runtime?
rem /**
Here is a
multiline comment
rem */
@hyyan Will following code be accepted as multiline comment in your runtime?
rem /** Here is a multiline comment rem */
No. comment lines should start with REM
. The block comment is tricky and requires defining onEnterRules
@hyyan
The starting sequence is rem /* and the end one is rem /
Then this will not work as a multiline comment in vs-code.
@hyyan Maybe we could add a code snippet for that. What do you think?
rem /**
rem *
rem */
@dhuebner We have that working in Eclipse and we got it working in vscode before by using something like that. Even though it is not 100% optimal. Maybe we can use that as a start and improve it ?
{
"comments": {
"lineComment": "rem",
"blockComment": [
"rem /**",
"rem */"
]
},
"onEnterRules": [
{
"beforeText": "^\\s*rem\\s*\\/\\*\\*(?!\\/)([^\\*]|\\*(?!\\/))*$",
"action": {
"indent": "indentOutdent",
"appendText": "rem * "
}
},
{
"beforeText": "^\\s*rem\\s*\\*[^\\/].*$",
"action": {
"indent": "none",
"appendText": "rem * "
}
},
{
"beforeText": "^\\s*rem[^\\*]$",
"action": {
"indent": "none",
"appendText": "rem "
}
}
]
}
@hyyan Sure! Would you like to open a PR? Here is the config file: https://github.com/BBx-Kitchen/bbj-language-server/blob/main/bbj-vscode/language-configuration.json
@dhuebner I'll prepare one
https://github.com/BBx-Kitchen/bbj-language-server/assets/4313420/c9e3f1a0-03ec-4281-8258-117dc82bbd60