关于module的ast


#1

请问有人知道这个Expr的args的第一个索引位置上的那个Bool代表什么吗?

julia> macro f(a) dump(a) end
@f (macro with 2 methods)

julia> @f module S
       end
Expr
  head: Symbol module
  args: Array{Any}((3,))
    1: Bool true
    2: Symbol S
    3: Expr
      head: Symbol block
      args: Array{Any}((2,))
        1: LineNumberNode
          line: Int64 1
          file: Symbol REPL[13]
        2: LineNumberNode
          line: Int64 2
          file: Symbol REPL[13]

#2

我猜是用来标注module是否是一个baremodule:

julia> :(module S end) |> dump
Expr
  head: Symbol module
  args: Array{Any}((3,))
    1: Bool true
    2: Symbol S
    3: Expr
      head: Symbol block
      args: Array{Any}((2,))
        1: LineNumberNode
          line: Int64 1
          file: Symbol REPL[1]
        2: LineNumberNode
          line: Int64 1
          file: Symbol REPL[1]

julia> :(baremodule S end) |> dump
Expr
  head: Symbol module
  args: Array{Any}((3,))
    1: Bool false
    2: Symbol S
    3: Expr
      head: Symbol block
      args: Array{Any}((2,))
        1: LineNumberNode
          line: Int64 1
          file: Symbol REPL[2]
        2: LineNumberNode
          line: Int64 1
          file: Symbol REPL[2]


#3

待证实。谢谢(比心