提交 0f55a887 编写于 作者: 梦境迷离's avatar 梦境迷离

update README.md

上级 ffa8bc61
...@@ -11,12 +11,12 @@ scala macro and abstract syntax tree learning code. ...@@ -11,12 +11,12 @@ scala macro and abstract syntax tree learning code.
- source code - source code
```scala ```scala
@toString @toString
class TestClass(val i: Int = 0, var j: Int) { class TestClass(val i: Int = 0, var j: Int) {
val y: Int = 0 val y: Int = 0
var z: String = "hello" var z: String = "hello"
var x: String = "world" var x: String = "world"
} }
``` ```
- result of scalac - result of scalac
```scala ```scala
...@@ -30,7 +30,7 @@ class TestClass extends scala.AnyRef { ...@@ -30,7 +30,7 @@ class TestClass extends scala.AnyRef {
val y: Int = 0; val y: Int = 0;
var z: String = "hello"; var z: String = "hello";
var x: String = "world"; var x: String = "world";
override def toString(): String = scala.collection.immutable.List(i, j, y, z, x).toString.replace("List", "TestClass") // Use crude methods. override def toString(): String = scala.collection.immutable.List(i, j, y, z, x).toString.replace("List", "TestClass") // a crude way, TODO refactor it.
} }
``` ```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册