hirosystems / clarinet

Write, test and deploy high-quality smart contracts to the Stacks blockchain and Bitcoin.
https://hiro.so/clarinet
GNU General Public License v3.0
298 stars 132 forks source link

Parser raising placeholder related issue #447

Closed lgalabru closed 1 year ago

lgalabru commented 2 years ago
;; counter
;; let's get started with smart contracts
(define-data-var counter uint u1)

&

(define-constant CONTRACT_OWNER tx-sender)

raise 2 errors:

error: unknown symbol, '&'
--> contracts/counter.clar:7:1
&
^
error: unexpected 'placeholder'
--> contracts/counter.clar:7:1
&
^
obycode commented 2 years ago

The new parser about to be merged into the blockchain (stacks-network/stacks-blockchain#3150) replaces these "placeholders" with a new placeholder node that should be handled more cleanly. I will revisit this after merging the canonical VM back into the REPL (#474).