Skip to content
Snippets Groups Projects
Commit 2f2d2434 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

Merge pull request #13 from Astalaseven/autodoc

Fix typo in documentation
parents 8b0763d7 acc119bb
No related branches found
No related tags found
No related merge requests found
Introduction
============
 
Baron is a FST for Python, a Full Syntax Tree. By opposition to an AST which
Baron is a Full Syntax Tree (FST) library for Python. By opposition to an AST which
drops some syntax information in the process of its creation (like empty lines,
comments, formatting), a FST keeps everything and guarantees the operation
<code>ast\_to\_code(code\_to\_ast(source\_code)) == source\_code</code>.
Loading
Loading
@@ -21,15 +21,15 @@ ast = parse(source_code_string)
source_code_string == dumps(ast)
```
 
There is great chances that you'll probably want to use
There is a good chance that you'll want to use
[RedBaron](https://github.com/Psycojoker/redbaron) instead of using Baron
directly. Think of Baron as the "bytecode of python source code" and RedBaron
as some sort of usable layer on top of it.
 
If you don't know what Baron is or don't understand yet why it might proves
itself useful for you, read the next section.
If you don't know what Baron is or don't understand yet why it might be
useful for you, read the next section.
 
'Documentation' is bellow.
'Documentation' is below.
 
Why is this important?
======================
Loading
Loading
@@ -47,7 +47,7 @@ series of problems to illustrate it. Let's say that you want to write a program
* implement the class browser of smalltalk for python (the whole one where you can edit the code of the methods, not just showing code)
 
It is very likely that you will end up with the awkward feeling of writing
clumpsy weak code that is very likely to break because you didn't though about
clumpsy weak code that is very likely to break because you didn't thought about
all the annoying special cases and the formatting keeps bothering you. You may
end up playing with [ast.py](http://docs.python.org/2/library/ast.html) until
you realize that it removes too much information to be suitable for those
Loading
Loading
@@ -63,7 +63,7 @@ will give you back your code only modified where you have modified the tree.
 
Said in another way, what I'm trying to achieve with Baron is a paradigm change in
which writing code that will modify code is now a realist task that is worth
the price (I'm not saying a simple task, but a realist task, it's still a
the price (I'm not saying a simple task, but a realistic one: it's still a
complex task).
 
Other
Loading
Loading
@@ -71,8 +71,8 @@ Other
 
Having a FST (or at least a good abstraction build on it) also makes it easier
to do code generation and code analysis while those two operations are already
quite feasible (using [ast.py](http://docs.python.org/2/library/ast.html) for
example and a templating engine).
quite feasible (using [ast.py](http://docs.python.org/2/library/ast.html)
and a templating engine for example).
 
Some technical details
======================
Loading
Loading
@@ -94,13 +94,13 @@ back exactly into the original source code. So, it can be considered quite
stable, but it is far away from having been battle tested.
 
Since the project is very young and no one is already using it except my
project, I'm open to modifications of the FST nodes but I will become
conversative very fast once it gets some adoption and will probably accept to
modify it only once or two in the future with clear indications on how to
project, I'm open to changes of the FST nodes but I will quickly become
conservative once it gets some adoption and will probably accept to
modify it only once or twice in the future with clear indications on how to
migrate.
 
**Baron is targeting python 2.[67]**. It has not been tested on python3 but
should be working for most part (except the new grammar like "yield from",
should be working for most parts (except the new grammar like "yield from",
obviously).
 
Documentation
Loading
Loading
Baron
=====
 
Baron is a FST for Python, a Full Syntax Tree. By opposition to an AST which
Baron is a Full Syntax Tree (FST) for Python. By opposition to an AST which
drops some syntax information in the process of its creation (like empty lines,
comments, formatting), a FST keeps everything and guarantees the operation
ast_to_code(code_to_ast(source_code)) == source_code.
Loading
Loading
@@ -26,7 +26,7 @@ Basic Usage
RedBaron
========
 
There is great chances that you'll probably want to use
There is a good chance that you'll want to use
[RedBaron](https://github.com/Psycojoker/redbaron) instead of using Baron
directly. Think of Baron as the "bytecode of python source code" and RedBaron
as some sort of usable layer on top of it.
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment