Picolab / Picolab/pico-engine

Support nested block comments

Open
#281 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement new language feature
Dominant language
TypeScript
Stars
51
Forks
10
Avg merge
4m
Merged PRs (30d)
1

Description

Languages that copy the C family's /**/ block comment behavior (like JavaScript) have a problem:

/*
"/*".klog("*/")
*/

Parse error.

Perl and Lua allow a family of block comment tokens to prevent interference with commented content. Other languages I'm familiar with either force the user to use line comments instead (IDE expected) or require complex parsing of content that's supposed to be skipped.

For example, we could allow

/**
"/*".klog("*/")
**/

See also Jonathan Blow's Jai language.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named, so start by locating the parser and its syntax tests for block comments. Reproduce the shown parse error, then verify the proposed /** ... */ form handles nested comment-like content without interference from inner / and */ tokens.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.