いろんな言語のコメントの書き方

* プログラミング言語 (C など)
* シェル言語 (Shell など)
* ビルド言語 (GNU Make など)
* メタビルド言語 (CMake など)
* マークアップ言語 (HTML など)

を含む様々な言語のコメントの書き方を一覧にしました。

## Ada

```ada
-- single-line comment
```

## APL

```apl
⍝ single-line comment
```

## AsciiDoc

```asciidoc
// line comment

////
    block comment
////

[comment]
--
block comment
--

[comment]
block comment
```

References

1. [AsciiDoctor Docs - Comments](https://docs.asciidoctor.org/asciidoc/latest/comments/)

## AWK (POSIX.1-2017)

```awk
# line comment
```

## B

## Bash



## Basic

## C

```c
// single-line comment
/*
    multi-line comment
*/
```

## C++

```c++
// single-line comment
/*
    multi-line comment
*/
```

## C#

```c#
// single-line comment
/*
    multi-line comment
*/
```

## CSS

```css
/*
    multi-line comment
*/
```

## D

```d
// single-line comment
/*
    multi-line comment
*/
/+
    nestable multi-line comment
+/
/// single-line documentation comment
/**
    multi-line documentation comment
*/
/++ nestable multi-line documentation comment
+/
```

## DOT

```dot
// line comment
/*
    block comment
*/
```

Reference

1. Graphviz, DOT Language, https://graphviz.org/doc/info/lang.html.

## F#

```fsharp
// line comment
(*
    block comment
*)
```

## Fortran

## Fortress

## ECMAScript

## Erlang

## Fish

```fish
# single-line comment
```

## Go

```go
// single-line comment
/*
    multi-line comment
*/
```

## Gradle

Groovy か Kotlin のサブセットであるのでそれに従う。

## Groovy

```groovy
// line comment
/*
    block comment
*/
```

## Haskell

```haskell
-- line comment
{-
    block comment
-}
```

## Haxe

```haxe
// single-line comment
/**
    multi-line comment
**/
```

## HTML

```html
<!--
    multi-line comment
-->
```

## Io

## J

## Java

```java
// single-line comment
/*
    multi-line comment
*/
```

## JavaScript

```js
// single-line comment
/*
    multi-line comment
*/
```

## Julia

```julia
# single-line comment
#=
    multi-line comment
=#
"single-line documentation comment"
foo(xs::Array) = ...
"""
    multi-line documentation comment
"""
bar(xs::Array) = ...
```

## Kotlin

```kotlin
// single-line comment
/*
    multi-line comment
*/
```

## Lisp

## Lua

```lua
-- line comment
--[[
    block comment
--]]
```

他にもブロックコメントの方法があるらしいがよく分かっていない。

## GNU Make

```make
# single-line comment
```

## Matlab

```matlab
% line comment
%{
    block comment
%}
```

## Apache Maven

XML のサブセットなので XML に準ずる。

## m4

```m4
# line comment
```

References:

1. [POSIX.1-2017 m4](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/m4.html)
2. [GNU m4](https://www.gnu.org/software/m4/manual/m4.html#Comments)

## Nim

```nim
# single-line comment
#[
    multi-line comment
]#
```

## Meson

```meson
# line comment
```

References 

1. https://mesonbuild.com/Syntax.html#comments

## Ninja

```ninja
# line comment
```

## OCaml

## Pascal

```pascal
(*
    block comment
*)  
{
    block comment
}  
```

## Perl

```perl
# single-line comment
=pod
    multi-line documentation comment
=cut
```

## PowerShell

```powershell
# single-line comment
<#
    multi-line comment
#>
```

## Protocol Buffer 2

```protobuf
// single-line comment
/*
    multi-line comment
*/
```

## Protocol Buffer 3

```protobuf
// single-line comment
/*
    multi-line comment
*/
```

## Python

```python
# single-line comment
"""
    documentation comment
"""
```

## Q

## R

```r
# line comment
```

## Rust

```rust
// line comment
/*
    block comment
*/
//! inner line documentation comment
/// outer line documentation comment
/**
    outer block documentation comment
*/
```

## S

## Scala

## Scheme (R⁵RS)


```scheme
; single-line comment
```

## Scheme (R⁶RS)

```scheme
; single-line comment
#; single-line comment
#|
    multi-line comment
|#
```

## Shell (POSIX.1-2017)

```shell
# line comment
```

References

1. [Shell Command Language](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html)

## SQLite

```sql
-- line comment
/*
    block comment
*/
```

## Swift

```swift
// line comment
/*
    block comment
*/
```

## TeX

```tex
% line comment
```

## TOML

```toml
# single-line comment
```

## U

## Vala

## Wolfram

```wolfram
(*
    multi-line comment
*)
```

## XML

```xml
<!--
    multi-line comment
-->
```

## YAML

```yaml
# line comment
```