anonym | Anmelden | Neues Konto anmelden | 2022-08-18 17:43 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 | ||
0000079 | [Mascot] general | kleinerer Fehler | nicht getestet | 2011-08-08 16:27 | 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 | 0000079: Treat [< ... >] and [| ... |] blocks like { ... } blocks | ||||||
Beschreibung |
Ocaml Programming Guidelines don't say anything about it, but : - arrays are printed with inner spaces by toplevel ; - some examples in ocaml documentation are written in this style |
||||||
Zusätzliche Information |
Below is a trivial patch that corrects this issue: diff --git a/src/checks/typo_spacesAroundBlocks.ml b/src/checks/typo_spacesAroundBlocks.ml index 1b8495b..4ed5614 100644 --- a/src/checks/typo_spacesAroundBlocks.ml +++ b/src/checks/typo_spacesAroundBlocks.ml @@ -84,17 +84,17 @@ let run _ _ (_, tokens) _ report = | (_, _, prev) :: (line, column, (Camlp4.Sig.SYMBOL s)) :: tl -> let err = report.Check.error line (Some column) in (match s with - | "(" | "[" | "[|" -> + | "(" | "[" -> if symbol_kind prev <> Opening then Camlp4Utils.check_white "sign" s err prev; Camlp4Utils.check_first_not_white "sign" s err tl - | ")" | "]" | "|]" -> + | ")" | "]" -> let prev_kind = symbol_kind prev in if (prev_kind <> Closing) && (prev_kind <> Opening) then Camlp4Utils.check_not_white "sign" s err prev; if not (first [Closing; Punctuation] tl) then Camlp4Utils.check_first_white "sign" s err tl - | "{" | "}" -> + | "{" | "}" | "[|" | "|]" | "[<" | ">]" -> Camlp4Utils.check_white "sign" s err prev; if not (first [Closing; Punctuation] tl) then Camlp4Utils.check_first_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 |