@@ -524,6 +524,15 @@ class XQueryCommentStyle(CommentStyle):
524524 INDENT_BEFORE_END = " "
525525
526526
527+ class CSingleCommentStyle (CommentStyle ):
528+ """C single-only comment style."""
529+
530+ SHORTHAND = "csingle"
531+
532+ SINGLE_LINE = "//"
533+ INDENT_AFTER_SINGLE = " "
534+
535+
527536#: A map of (common) file extensions against comment types.
528537EXTENSION_COMMENT_STYLE_MAP = {
529538 ".adb" : HaskellCommentStyle ,
@@ -600,7 +609,7 @@ class XQueryCommentStyle(CommentStyle):
600609 ".graphql" : PythonCommentStyle ,
601610 ".groovy" : CCommentStyle ,
602611 ".h" : CCommentStyle ,
603- ".ha" : CCommentStyle ,
612+ ".ha" : CSingleCommentStyle ,
604613 ".hbs" : HandlebarsCommentStyle ,
605614 ".hcl" : PythonCommentStyle ,
606615 ".hh" : CCommentStyle ,
@@ -712,11 +721,11 @@ class XQueryCommentStyle(CommentStyle):
712721 # SuperCollider synth definition (binary)
713722 ".scsyndef" : UncommentableCommentStyle ,
714723 ".sh" : PythonCommentStyle ,
715- ".sld" : LispCommentStyle , # Scheme Library Definition (R7RS)
716- ".sls" : LispCommentStyle , # Scheme Library Source (R6RS)
724+ ".sld" : LispCommentStyle , # Scheme Library Definition (R7RS)
725+ ".sls" : LispCommentStyle , # Scheme Library Source (R6RS)
717726 ".sml" : MlCommentStyle ,
718727 ".soy" : CCommentStyle ,
719- ".sps" : LispCommentStyle , # Scheme Program Source (R6RS)
728+ ".sps" : LispCommentStyle , # Scheme Program Source (R6RS)
720729 ".sql" : HaskellCommentStyle ,
721730 ".sty" : TexCommentStyle ,
722731 ".svg" : UncommentableCommentStyle ,
@@ -756,6 +765,7 @@ class XQueryCommentStyle(CommentStyle):
756765 ".xsl" : HtmlCommentStyle ,
757766 ".yaml" : PythonCommentStyle ,
758767 ".yml" : PythonCommentStyle ,
768+ ".zig" : CSingleCommentStyle ,
759769 ".zsh" : PythonCommentStyle ,
760770}
761771
0 commit comments