You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,12 @@
10
10
11
11
A [Prettier plugin](https://prettier.io/docs/en/plugins.html) for automatically formatting your [Solidity](https://github.com/ethereum/solidity) code.
12
12
13
+
## Nomic Foundation's Slang
14
+
15
+
Nomic Foundation has put a lot of effort in providing a set of compiler APIs that helped us rethink our approach to parsing and rely on their flexibility, detail oriented solution and continuos support of new and old Solidity syntaxes.
16
+
17
+
Since v2.0.0 this package will ship with the Slang parser and this change must be implemented in existing configurations by replacing `parser: 'solidity-parse'` with `parser: 'slang-solidity'`.
18
+
13
19
## Installation and usage
14
20
15
21
### Using in NodeJS
@@ -40,7 +46,7 @@ Or you can use it as part of your linting to check that all your code is prettif
40
46
41
47
> Prettier Solidity only works with valid code. If there is a syntax error, nothing will be done and a parser error will be thrown.
42
48
43
-
### Using in the Browser
49
+
### ~~Using in the Browser~~_Disabled during v2.0.0-beta_
44
50
45
51
_Added in v1.1.0_
46
52
@@ -61,7 +67,7 @@ We follow Prettier's strategy for populating their plugins in the object `pretti
61
67
<script>
62
68
asyncfunctionformat(code) {
63
69
returnawaitprettier.format(code, {
64
-
parser:'solidity-parse',
70
+
parser:'slang-solidity',
65
71
plugins: [solidityPlugin]
66
72
});
67
73
}
@@ -73,7 +79,7 @@ We follow Prettier's strategy for populating their plugins in the object `pretti
73
79
74
80
For more details and please have a look at [Prettier's documentation](https://prettier.io/docs/en/browser.html).
75
81
76
-
### Creating a package for the Browser
82
+
### ~~Creating a package for the Browser~~_Disabled during v2.0.0-beta_
77
83
78
84
_Added in v1.2.0_
79
85
@@ -85,7 +91,7 @@ import solidityPlugin from 'prettier-plugin-solidity/standalone';
85
91
86
92
asyncfunctionformat(code) {
87
93
returnawaitprettier.format(code, {
88
-
parser:"solidity-parse",
94
+
parser:"slang-solidity",
89
95
plugins: [solidityPlugin],
90
96
});
91
97
}
@@ -106,7 +112,7 @@ The following is the default configuration internally used by this plugin.
0 commit comments