Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions web/webapp.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@

(defun parse-string (string)
"Translate string to a list expression"
(mapcar (lambda (x)
(intern (string-upcase x) :lisp-inference))
(str:words string)))
(if (and (str:starts-with-p "(" string)
(str:ends-with-p ")" string))
(read-from-string string)
(read-from-string (str:concat "(" string ")"))))

(defun trim-paren (string)
Copy link
Owner

Choose a reason for hiding this comment

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

poderia remover essa função?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adicionei o commit pra remover.

Copy link
Owner

Choose a reason for hiding this comment

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

Ótimo! Agora precisamos remover a funcall dela no método render para o tipo truth-table

Copy link
Owner

Choose a reason for hiding this comment

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

Aqui

:placeholder (trim-paren (prop table)))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

(string-trim '(#\( #\)) string))
Expand Down