#dang: directives before instead of after

1 messages · Page 1 of 1 (latest)

dim whale
#
let source: Directory! @defaultPath(path: "/")
@defaultPath(path: "/")
let source: Directory!
pub source: Directory! @defaultPath(path: "/") @ignorePatterns(patterns: [
  # TODO: respecting .gitignore would be nice
  "Session.vim"
  "dang"
  "zed-dang/grammars/"
  ".env"
  ".envrc"
  ".dagger"
])

=>

@defaultPath(path: "/")
@ignorePatterns(patterns: [
  # TODO: respecting .gitignore would be nice
  "Session.vim"
  "dang"
  "zed-dang/grammars/"
  ".env"
  ".envrc"
  ".dagger"
])
pub source: Directory!
#

hmm i feel like pub source: Directory! @defaultPath(...) reads better though

#

another option:

pub test(... possibly long args ...): Void @check {
  # ...
}