Skip to content

Comment style for Hare Language is incorrect #888

@perillo

Description

@perillo

Hare, like Zig, supports C99 single line comments but does not support C multi-line comments.

Example

/*
 * SPDX-License-Identifier: BSD-3-Clause
 * SPDX-License-Identifier: BSD-4-Clause
 */

use fmt;

export fn main() void = {
	fmt::println("Hello world!")!;
}; 
$ reuse annotate --license "BSD-3-Clause" --license "BSD-4-Clause" --multi-line hare.ha
$ hare build /tmp/hare.ha                                                                                                                  [255]
0/4 tasks completed (0%)
/tmp/hare.ha:1:1: syntax error: expected 'fn', found '/'

1 |	/*
  |	^


harec for /tmp/hare.ha exited with status 1

I have a PR ready that solves the problem by adding ZigCommentStyle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions