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

Brand New Parser #1

Merged
merged 34 commits into from
Apr 20, 2024
Merged

Brand New Parser #1

merged 34 commits into from
Apr 20, 2024

Conversation

sovetnik
Copy link
Owner

@sovetnik sovetnik commented Dec 30, 2023

It should parse at least next clauses:

  • comparsions,
  • guards,
  • literals,
  • :def,
  • :defmodule,
  • :defstruct,
  • :@,
  • :defmacro,
  • pipe,
  • :defguard,
  • lists [head | tail],
  • fix root parsing

Copy link
Collaborator

@am-kantox am-kantox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is most likely not a complete-complete code review, but I spotted some important things and (hopefully) gave some thought to investigate further.

lib/umwelt.ex Outdated Show resolved Hide resolved
lib/umwelt.ex Outdated Show resolved Hide resolved
lib/umwelt/files.ex Outdated Show resolved Hide resolved
lib/umwelt/files.ex Outdated Show resolved Hide resolved
lib/umwelt/files.ex Outdated Show resolved Hide resolved
lib/umwelt/parser/match.ex Outdated Show resolved Hide resolved
lib/umwelt/parser/struct.ex Outdated Show resolved Hide resolved
lib/umwelt/parser/triple.ex Outdated Show resolved Hide resolved
lib/umwelt/parser/when.ex Outdated Show resolved Hide resolved
lib/umwelt/parser/when.ex Outdated Show resolved Hide resolved
Copy link
Collaborator

@am-kantox am-kantox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe suggestions might be committed.

@sovetnik
Copy link
Owner Author

About committing changes, I try to check the regression every time, and when all code is modified in editor, it becomes hard to commit, requiring rebase. Maybe I have to read something about workflow with suggestions.

lib/umwelt/parser/comparsion.ex Outdated Show resolved Hide resolved
lib/umwelt/parser/macro.ex Outdated Show resolved Hide resolved
lib/umwelt/parser/macro.ex Outdated Show resolved Hide resolved
Kernel.and(true, false) - done;
true |> Kernel.and(true) - in commented test,
need to implement pipes parsing
@sovetnik
Copy link
Owner Author

Looks like almost done. What did I forget or maybe gave a weird name?

- Parse Structures %{} and <<>>
- Simple and Qualified calls
- Add metadata to when, structures and other
- Group tests in describe for readability
Comment on lines +17 to +19
{:ok, regex} = Regex.compile("#{project}.ex")

with {:ok, files} <- File.ls(path),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lib/umwelt/parser.ex Outdated Show resolved Hide resolved
@sovetnik sovetnik merged commit f6ed919 into main Apr 20, 2024
12 checks passed
@github-staff github-staff deleted a comment from isedwards May 1, 2024
@github-staff github-staff deleted a comment from isedwards May 1, 2024
@github-staff github-staff deleted a comment from pisgo May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants