================================================================================
One line comment without linebreak
================================================================================
--
--------------------------------------------------------------------------------

(file
  (line_comment))

================================================================================
One line comments
================================================================================

-- MODEL
-- update
-- more words
-- note: (isOkay x || any isOkay xs) would not get TCO

--------------------------------------------------------------------------------

(file
  (line_comment)
  (line_comment)
  (line_comment)
  (line_comment))

================================================================================
Block comments
================================================================================

{- one line -}
{- a multiline comment
  how nice
-}
{-| Returns a dictionary mapping `ScreenId` to its problems, if any.
-}
{--}
-- add x y = x + y
--}

--------------------------------------------------------------------------------

(file
  (block_comment)
  (block_comment)
  (block_comment)
  (block_comment)
  (line_comment)
  (line_comment))

================================================================================
Complex Block comment
================================================================================

{-| Works just like [`Parser.Nestable`](Parser#nestable) to help distinguish
between unnestable `/*` `*/` comments like in JS and nestable `{-` `-}`
comments like in Elm.
-}

--------------------------------------------------------------------------------

(file
  (block_comment))

================================================================================
Comment syntax within a string
================================================================================

module Main exposing ( ..)
one="\"{-"
two="""-}
notAThing = something
\"""
notAThing2 = something
"""
three = '"' {- "
notAThing3 = something
-}
four{--}=--{-
    1
five = something
--}

--------------------------------------------------------------------------------

(file
  (module_declaration
    (module)
    (upper_case_qid
      (upper_case_identifier))
    (exposing_list
      (exposing)
      (double_dot)))
  (value_declaration
    (function_declaration_left
      (lower_case_identifier))
    (eq)
    (string_constant_expr
      (open_quote)
      (string_escape)
      (regular_string_part)
      (close_quote)))
  (value_declaration
    (function_declaration_left
      (lower_case_identifier))
    (eq)
    (string_constant_expr
      (open_quote)
      (regular_string_part)
      (string_escape)
      (regular_string_part)
      (close_quote)))
  (value_declaration
    (function_declaration_left
      (lower_case_identifier))
    (eq)
    (char_constant_expr
      (open_char)
      (regular_string_part)
      (close_char)))
  (block_comment)
  (value_declaration
    (function_declaration_left
      (lower_case_identifier))
    (block_comment)
    (eq)
    (line_comment)
    (number_constant_expr
      (number_literal)))
  (value_declaration
    (function_declaration_left
      (lower_case_identifier))
    (eq)
    (value_expr
      (value_qid
        (lower_case_identifier))))
  (line_comment))

================================================================================
Nested block comment are not nested for now
================================================================================

{- comment {- nested comment -} -}

--------------------------------------------------------------------------------

(file
  (block_comment))

================================================================================
Empty comment
================================================================================

module A exposing (match)

{-
-}

match : String -> Maybe ( String, String )
match input =
    Nothing

--------------------------------------------------------------------------------

(file
  (module_declaration
    (module)
    (upper_case_qid
      (upper_case_identifier))
    (exposing_list
      (exposing)
      (exposed_value
        (lower_case_identifier))))
  (block_comment)
  (type_annotation
    (lower_case_identifier)
    (colon)
    (type_expression
      (type_ref
        (upper_case_qid
          (upper_case_identifier)))
      (arrow)
      (type_ref
        (upper_case_qid
          (upper_case_identifier))
        (tuple_type
          (type_expression
            (type_ref
              (upper_case_qid
                (upper_case_identifier))))
          (type_expression
            (type_ref
              (upper_case_qid
                (upper_case_identifier))))))))
  (value_declaration
    (function_declaration_left
      (lower_case_identifier)
      (lower_pattern
        (lower_case_identifier)))
    (eq)
    (value_expr
      (upper_case_qid
        (upper_case_identifier)))))

================================================================================
Empty comment inside function
================================================================================

match : String -> Maybe ( String, String )
match input =
    {-
-}
    Nothing

--------------------------------------------------------------------------------

(file
  (type_annotation
    (lower_case_identifier)
    (colon)
    (type_expression
      (type_ref
        (upper_case_qid
          (upper_case_identifier)))
      (arrow)
      (type_ref
        (upper_case_qid
          (upper_case_identifier))
        (tuple_type
          (type_expression
            (type_ref
              (upper_case_qid
                (upper_case_identifier))))
          (type_expression
            (type_ref
              (upper_case_qid
                (upper_case_identifier))))))))
  (value_declaration
    (function_declaration_left
      (lower_case_identifier)
      (lower_pattern
        (lower_case_identifier)))
    (eq)
    (block_comment)
    (value_expr
      (upper_case_qid
        (upper_case_identifier)))))
