apache / apache/cordova-node-xcode
Allow asterisks in comments
- Lingua principale
- JavaScript
- Stelle
- 217
- Fork
- 102
- Merge medio
- 2g 3h
- PR unite (30g)
- 6
Descrizione
Once the parser passes a `/*` token, it proceeds to search for a `*/` token, throwing a SyntaxError as soon as it encounter an asterisk not immediately followed by a slash. Comments can contain asterisks though. Many of these comments in project files are autogenerated, for example based on a file name which could have an asterisk in it.
Could the parser ignore `*` characters between `/*` and `*/`, continuing its search without issue until it finds the closing `*/`?
To reproduce the below, call the parser on any (file containing a) line such as `/* Upload *.dSYM to Firebase */`:
```
Thrown:
{ [SyntaxError: Expected "*/" or [^*] but "*" found.
]
message: 'Expected "*/" or [^*] but "*" found.',
expected:
[ { type: 'class',
parts: [Array],
inverted: true,
ignoreCase: false },
{ type: 'literal', text: '*/', ignoreCase: false },
{ type: 'class',
parts: [Array],
inverted: true,
ignoreCase: false },
{ type: 'literal', text: '*/', ignoreCase: false } ],
found: '*',
location:
{ start: { offset: 697, line: 13, column: 35 },
end: { offset: 698, line: 13, column: 36 } },
name: 'SyntaxError' }
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Individua il punto di ingresso del parser che gestisce i commenti /* e riproduci il problema con `/* Upload *.dSYM to Firebase */`. Traccia il modo in cui viene analizzato il corpo del commento, quindi verifica che un asterisco interno venga accettato mentre */ di chiusura continui a terminare il commento senza un SyntaxError.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, nodejs
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100