Этот коммит содержится в:
andygeiss 2018-06-18 19:26:13 +02:00
родитель eb79c94690
коммит d1d076bdc4
3 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -33,6 +33,7 @@ var (
"timer.Delay": "delay",
"wifi": "WiFi",
"wifi.Client": "WiFiClient",
"client.Connect": "client.connect",
"wifi.Begin": "WiFi.begin",
"wifi.BeginEncrypted": "WiFi.begin",
"wifi.BSSID": "WiFi.BSSID",

Просмотреть файл

@ -8,6 +8,7 @@ import (
"go/token"
"io"
"strings"
"os"
)
const (
@ -74,7 +75,7 @@ func (w *Worker) Start() error {
}
}
// Print the AST.
// ast.Fprint(os.Stderr, fset, file, nil)
ast.Fprint(os.Stderr, fset, file, nil)
return nil
}
@ -152,12 +153,20 @@ func handleExpr(expr ast.Expr) string {
code += handleCallExpr(e)
case *ast.Ident:
code += handleIdent(e)
case *ast.ParenExpr:
code += handleParenExpr(e)
case *ast.SelectorExpr:
code += handleSelectorExpr(e)
}
return code
}
func handleParenExpr (stmt *ast.ParenExpr) string {
code := ""
code += handleExpr(stmt.X)
return code
}
func handleExprStmt(stmt *ast.ExprStmt) string {
code := ""
switch x := stmt.X.(type) {

Просмотреть файл

@ -471,7 +471,7 @@ func Test_WiFiWebClient(t *testing.T) {
Serial.print("Connecting to");
Serial.println(host);
Serial.print(" ...");
if(){
if(client.connect(host, 443){
Serial.println(" Connected!");
} else {
Serial.println(" Failed!");