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

A way to define scopes #5

Closed
hrj opened this issue Jul 4, 2013 · 1 comment
Closed

A way to define scopes #5

hrj opened this issue Jul 4, 2013 · 1 comment
Assignees
Milestone

Comments

@hrj
Copy link
Owner

hrj commented Jul 4, 2013

Something like:

{
def x = 10

def defautlAccount = "Cash"

2013/1/1
  Expense           -100

}

# x not visible here
# defaultAccount not applicable here
  • Scopes can be nested
  • Every .ledger file will have an implicit scope surrounding the entire file contents.
@ghost ghost assigned hrj Jul 4, 2013
@hrj hrj modified the milestones: Version 0.3, Version 0.2 May 6, 2014
@hrj hrj mentioned this issue Jul 27, 2015
@hrj hrj added the design label Jul 30, 2015
@hrj
Copy link
Owner Author

hrj commented Mar 24, 2016

Comment by @jaa127 via email

Now a separate issue: #88

hrj added a commit that referenced this issue Jun 24, 2016
For GH-5

All files have an implicit scope.

When a ledger file (F) is included in a scope(S), a new scope (L) is created for the file with S as the parent scope.
The entries in L are merged with S, such that entries in S can refer to definitions from L.
And entries in L can refer to definitions from S.
@hrj hrj closed this as completed in b57081e Jun 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant