Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ For example, let's take an `Integer` in Ruby:
1
```

It's corresponding s-expression would be:
Its corresponding s-expression would be:

```ruby
s(:int, 1)
Expand Down Expand Up @@ -198,7 +198,7 @@ def my_method
end
```

It's corresponding s-expression would be:
Its corresponding s-expression would be:

```ruby
ast =
Expand Down
4 changes: 2 additions & 2 deletions docs/experiments.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ line tool.
- And the `policy` is executed to check if the current change is valuable

If the file contains multiple `before` or `after` blocks, each removal will
occur independently and the successfull removals will be combined as a
secondary change. The process repeates until find all possible combinations.
occur independently and the successful removals will be combined as a
secondary change. The process repeats until find all possible combinations.

See more examples in [experiments](experiments) folder.

Expand Down
2 changes: 1 addition & 1 deletion docs/ideas.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ This example, shows adds and removals from specific node targets between two
different files.

If we start tracking AST transition synapses and associating with "Fixes" or
"Reverts" we can predict introduction of new bugs by inpecting if the
"Reverts" we can predict introduction of new bugs by inspecting whether the
introduction of new patterns that can be possibly reverted or improved.

## Fast Rewriter with pure strings
Expand Down
4 changes: 2 additions & 2 deletions docs/shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ several interesting cases in action.

## List your fast shortcuts

As the interface is very rudimentar, let's build a shortcut to print what
As the interface is very rudimentary, let's build a shortcut to print what
shortcuts are available. This is a good one to your `$HOME/Fastfile`:

```ruby
Expand Down Expand Up @@ -46,7 +46,7 @@ I always miss bringing something simple as `grep keyword` where I can leave a si
search in all types of nodes and report interesting things about it.

Let's consider a very flexible search that can target any code related to some
keyword. Considering that we're talking about code indentifiers:
keyword. Considering that we're talking about code identifiers:


```ruby
Expand Down
4 changes: 2 additions & 2 deletions docs/similarity_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ Fast.search_file('(class (const nil $_))','lib/fast.rb').grep(Symbol)
:ExperimentFile]
```

The idea of this inspecton is build a proof of concept to show the similarity
The idea of this inspection is building a proof of concept to show the similarity
of matcher classes because they only define a `match?` method.

```ruby
patterns = Fast.search_file('class','lib/fast.rb').map{|n|Fast.expression_from(n)}
```

A simple comparison between the patterns size versus `.uniq.size` can proof if
A simple comparison between the patterns size versus `.uniq.size` can prove that
the idea will work.

```ruby
Expand Down
4 changes: 2 additions & 2 deletions docs/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def duplicate(value)
end
```

The expression is matching nodes that have a integer granchild and also with
The expression is matching nodes that have an integer grandchild and also with
type `def`.

## `...` is a **node** with children
Expand Down Expand Up @@ -305,7 +305,7 @@ Double check the expressions that have matched printing the AST:

## `{}` is for **any** matches like **union** conditions with **or** operator

Let's say we to add check all occurrencies of the constant `ANSWER`.
Let's say we want to add check all occurrences of the constant `ANSWER`.

We'll need to get both `casgn` and `const` node types. For such cases we can
surround the expressions with `{}` and it will return if the node matches with
Expand Down
Loading