================================================================================
incomplete behaviour attribute WIP
================================================================================

-behavior(gen

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

(source_file
  (ERROR
    (atom)))

================================================================================
missing dot after export attribute (limitation)
================================================================================

-export([foo/1]).
-'export'([])

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

(source_file
  (export_attribute
    (fa
      (atom)
      (arity
        (integer))))
  (export_attribute
    (MISSING ".")))

================================================================================
missing dot after variable (limitation)
================================================================================

  test(X) ->

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

(source_file
  (fun_decl
    (function_clause
      (atom)
      (expr_args
        (var))
      (clause_body
        (MISSING atom)))))

================================================================================
function after missing dot (limitation)
================================================================================

    foo() ->
        b
    bar() -> ok.   % ideally would be in AST

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

(source_file
  (fun_decl
    (function_clause
      (atom)
      (expr_args)
      (clause_body
        (atom))))
  (fun_decl
    (function_clause
      (atom)
      (expr_args)
      (clause_body
        (atom))))
  (comment))

================================================================================
function reference missing dot (limitation)
================================================================================

  foo() ->
      fun sample2:f

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

(source_file
  (ERROR
    (atom)
    (expr_args)
    (module
      (atom))
    (atom)))

================================================================================
incomplete record index (limitation)
================================================================================

 foo() -> #r.

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

(source_file
  (fun_decl
    (function_clause
      (atom)
      (expr_args)
      (clause_body
        (record_index_expr
          (record_name
            (atom))
          (record_field_name
            (MISSING atom)))))))

================================================================================
Incomplete function after spec
================================================================================

-spec foo() -> ok.
foo( -> ok.

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

(source_file
  (spec
    (atom)
    (type_sig
      (expr_args)
      (atom)))
  (fun_decl
    (function_clause
      (atom)
      (expr_args
        (MISSING ")"))
      (clause_body
        (atom)))))

================================================================================
Shebang, for escript
================================================================================

#!/usr/bin/env escript
%% -*- erlang -*-
foo() -> ok.

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

(source_file
  (shebang)
  (comment)
  (fun_decl
    (function_clause
      (atom)
      (expr_args)
      (clause_body
        (atom)))))
