ThakeeNathees / pocketlang

A lightweight, fast embeddable scripting language.
https://thakeenathees.github.io/pocketlang/
MIT License
1.52k stars 80 forks source link

docstrings support added #250

Closed ThakeeNathees closed 2 years ago

ThakeeNathees commented 2 years ago
def foo()
  "
  pocketlang now supports, docstrings. This is similler to python's (because it's easier to parse)
  If a string literal is found before any statements inside a function it'll consumed as docstring.
  And thay will be added to the function with name `_docs` (foo._docs) will return this string.
  "
end

print(foo._docs)