Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hint at lines of Hoon when supplied with source files #2

Open
hjorthjort opened this issue Mar 21, 2023 · 0 comments
Open

Hint at lines of Hoon when supplied with source files #2

hjorthjort opened this issue Mar 21, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@hjorthjort
Copy link
Contributor

!: for line hints in Hoon

You can get a Hoon AST with !,

!,  *hoon  foo:bar
!,  *hoon  !:  foo:bar
=>  bar=foo=3  !=  foo:bar
=>  bar=foo=3  !=  !:  foo:bar

gives

[ 11
  [1.953.460.339 1 [1.685.027.454 1.702.060.386 164.211.365.211.807.533.246.112.486.363.563.715.802.242.123.887.381.261.228.978.814 0] [1 24] 1 31]
  11
  [1.953.460.339 1 [1.685.027.454 1.702.060.386 164.211.365.211.807.533.246.112.486.363.563.715.802.242.123.887.381.261.228.978.814 0] [1 28] 1 31]
  0
  1
]

And you can see that


> `@t`1.953.460.339
'spot'

which is the name of the location type, which specifies a file name and file location

And the list that follows is a file:

> `tape``(list @)`[1.685.027.454 1.702.060.386 164.211.365.211.807.533.246.112.486.363.563.715.802.242.123.887.381.261.228.978.814 ~]
"~zodbase~2023.3.10..00.39.50..8a0f"

And then comes the location

@hjorthjort hjorthjort added the enhancement New feature or request label Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant