Swiftpack.co - bannzai/Ragnarok as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by bannzai.
bannzai/Ragnarok 1.0.2
Remake of destiny.
⭐️ 23
🕓 4 years ago
.package(url: "https://github.com/bannzai/Ragnarok.git", from: "1.0.2")

Ragnarok

Remake of destiny.

Introduction

Ragnarok rewrite swift file library.
If you have TestFunctionCallExprInGuard.swift

import Foundation

public class TestFunctionCallExprInGuard: TestDatable {
    public static func file() -> String {
        return #file
    }
    func example() {
        let test = TestFunctionDeclHasReturnType()

        guard let a = test.noArgumentHasReturnKeyword() else {
            return
        }
        guard let b = test.oneArgumentHasReturnKeyword(argument: 1) else {
            return
        }
        guard let c = test.twoArgumentHasReturnKeyword(argument1: 1, argument2: "string") else {
            return
        }

        print(a,b,c)
    }
}

And execute Ragnarok.

$ ragnarok ./TestFunctionCallExprInGuard.swift

You can see that each line of a function with two or more arguments is followed by a carriage return.
It can be said that remake of destiny.

import Foundation

public class TestFunctionCallExprInGuard: TestDatable {
    public static func file() -> String {
        return #file
    }
    func example() {
        let test = TestFunctionDeclHasReturnType()
        
        guard let a = test.noArgumentHasReturnKeyword() else {
            return
        }
        guard let b = test.oneArgumentHasReturnKeyword(argument: 1) else {
            return
        }
        guard let c = test.twoArgumentHasReturnKeyword(
            argument1: 1,
            argument2: "string"
            ) else {
            return
        }
        
        print(
            a,
            b,
            c
        )
    }
}

Why Ragnarok??

This project for I wanted to use SwiftSyntax with curiosity.
The name Ragnarok has no meaning. I just took it for saying. Same as remake of destiny.
The Ragnarok godparent is gaopin. Reference

License

Ragnarok is available under the MIT license.
See the LICENSE file for more info.

GitHub

link
Stars: 23
Last commit: 4 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Dependencies

Release Notes

Patch for remake of destiny.
5 years ago

Hahaha

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics