Boo

DSL-friendly method syntax

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 0.7.8
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

Allow methods to be called with macro syntax for better composition, example:

callable Block()

def blockTag(tagName as string, block as Block):
print "<${tagName}>"
block()
print "</${tagName}>"

def html(block as Block):
blockTag "html", block

def body(block as Block):
blockTag "body", block

def text(s as string):
print s

html:
body:
text "Hello, world!"

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: