anonym | Anmelden | Neues Konto anmelden | 2022-08-17 01:56 UTC |
Startseite | Übersicht | Probleme anzeigen | Änderungsprotokoll | Roadmap | Dokumentation | Konto |
Einfache Problemansicht anzeigen [ Zu Notizen wechseln ] | [ erweiterte Anzeige ] [ Problem-Historie ] [ Drucken ] | ||||||
ID | Kategorie | Auswirkung | Reproduzierbar | Meldungsdatum | Letzte Aktualisierung | ||
0000081 | [Mascot] general | kleinerer Fehler | nicht getestet | 2011-08-08 16:31 | 2012-08-29 20:16 | ||
Reporter | sigonnea | Anzeigestatus | öffentlich | ||||
Bearbeitung durch | xclerc | ||||||
Priorität | normal | Lösung | erledigt | ||||
Status | erledigt | Produktversion | 1.0-beta | ||||
Zusammenfassung | 0000081: Allow list or parenthesis directly following a label | ||||||
Beschreibung |
The following code should be accepted: f ~label:(some thing) ~foo:["bar"; "baz"] (instead, it complains abot missing whitespace before '(' or '[' sign) |
||||||
Zusätzliche Information |
Below is a patch that corrects this: diff --git a/src/checks/typo_spacesAroundBlocks.ml b/src/checks/typo_spacesAroundBlocks.ml index 4ed5614..2077d4d 100644 --- a/src/checks/typo_spacesAroundBlocks.ml +++ b/src/checks/typo_spacesAroundBlocks.ml @@ -42,6 +42,7 @@ type symbol_kind = | Opening | Closing | Punctuation + | Label | Other let symbol_kind = function @@ -59,6 +60,8 @@ let symbol_kind = function | Camlp4.Sig.SYMBOL ";" | Camlp4.Sig.SYMBOL ";;" | Camlp4.Sig.SYMBOL "." -> Punctuation + | Camlp4.Sig.LABEL _ + | Camlp4.Sig.OPTLABEL _ -> Label | _ -> Other let first kinds = function @@ -85,7 +88,8 @@ let run _ _ (_, tokens) _ report = let err = report.Check.error line (Some column) in (match s with | "(" | "[" -> - if symbol_kind prev <> Opening then + let prev_kind = symbol_kind prev in + if (prev_kind <> Opening) && (prev_kind <> Label) then Camlp4Utils.check_white "sign" s err prev; Camlp4Utils.check_first_not_white "sign" s err tl | ")" | "]" -> |
||||||
Tags | Keine Tags zugeordnet. | ||||||
Angehängte Dateien | |||||||
|
Zu diesem Problem gibt es keine Notizen. |
Mantis 1.1.7[^] Copyright © 2000 - 2008 Mantis Group |